Managed Databases Guide: PostgreSQL, MySQL, MongoDB & Redis | Nife

Deploy and manage fully-managed databases with automatic backups, high availability, and intelligent scaling.

Getting Started with Databases#

Deploy your first managed database in minutes:

  1. Databases Overview - Understand database options and benefits
  2. Creating Databases - Create your first database
  3. Connecting to Databases - Connect your applications
  4. Managing Databases - Monitor and scale your database
  5. Backup & Recovery - Protect your data

Supported Databases#

Deploy any of these popular database engines:

PostgreSQL 🐘#

Advanced relational database with powerful features

  • Best for: Complex queries, enterprise applications, analytics
  • Versions: 16.1, 15.6, 14.11, 13.14
  • Use: ACID compliance, advanced features, complex joins

MySQL 🐬#

Popular relational database for web applications

  • Best for: Web apps, LAMP stack, content management
  • Versions: 8.0.35, 8.0.34, 5.7.44
  • Use: WordPress, Drupal, traditional web applications

MariaDB 🌲#

MySQL-compatible open-source database

  • Best for: MySQL compatibility, modern features
  • Versions: 11.2.2, 10.11.6, 10.6.16
  • Use: MySQL migration, backward compatibility

MongoDB 📄#

Flexible document database for modern applications

  • Best for: Document data, flexible schema, real-time apps
  • Versions: 7.0.5, 6.0.13, 5.0.24
  • Use: Content management, user profiles, logs, JSON data

Redis ⚡#

In-memory data store for caching and real-time features

  • Best for: Caching, sessions, real-time analytics
  • Versions: 7.2.4, 7.0.15, 6.2.14
  • Use: Cache layer, session storage, real-time applications

Key Features#

✅ Automatic Backups#

  • Daily backups included
  • Point-in-time recovery (7 days)
  • 7-30 day retention
  • Geo-redundant storage

✅ High Availability#

  • 99.9% uptime SLA
  • Automatic failover
  • Multi-zone replication
  • Redundancy built-in

✅ Secure#

  • SSL/TLS encryption
  • Encrypted at rest (AES-256)
  • Access control & IAM
  • Audit logs for compliance

✅ Auto-Scaling#

  • Vertical scaling (CPU/Memory)
  • Horizontal scaling (Storage)
  • No downtime scaling
  • Automatic performance tuning

✅ Fully Managed#

  • Automatic patching
  • Version updates
  • Performance monitoring
  • Security updates included

Database Lifecycle#

1. Create Database#

Choose database type, configure storage and region

2. Connect Applications#

Get connection details and connect your apps

3. Monitor Performance#

Track metrics and optimize queries

4. Scale Resources#

Increase storage or compute as needed

5. Backup & Recovery#

Automated backups + point-in-time recovery

6. Archive & Delete#

Optional: Archive data and delete when done


Quick Start#

Step 1: Create Database#

1. Go to Databases → Create Database
2. Choose database type (PostgreSQL, MySQL, etc.)
3. Configure storage size (5-100 GB)
4. Select region
5. Set root password
6. Deploy

Step 2: Get Connection Details#

- Hostname: db-xxx.database.nifetency.com
- Port: 5432 (PostgreSQL), 3306 (MySQL)
- Username: root
- Password: Your secure password

Step 3: Connect Your App#

// Node.js example
const { Pool } = require('pg');
const pool = new Pool({
host: process.env.DB_HOST,
port: process.env.DB_PORT,
user: process.env.DB_USER,
password: process.env.DB_PASSWORD,
database: process.env.DB_NAME,
});

Step 4: Monitor & Scale#

  • Monitor performance metrics
  • Scale storage when reaching 70%
  • Enable automatic updates
  • Regular backup testing

Frequently Asked Questions#

Q: Are backups automatic?#

A: Yes, daily automatic backups are included. You also get point-in-time recovery for the last 7 days.

Q: How much does it cost?#

A: Pricing is based on storage size and compute resources. Check our pricing page for current rates.

Q: Can I change the database version?#

A: Yes, you can upgrade to newer versions. Some downgrades may be possible depending on compatibility.

Q: Is my data encrypted?#

A: Yes, data is encrypted in transit (SSL/TLS) and at rest using AES-256 encryption.

Q: Can I scale my database?#

A: Yes, you can increase CPU, memory, and storage anytime without downtime.

Q: What's the uptime guarantee?#

A: We guarantee 99.9% uptime SLA for all managed databases.

Q: How do I migrate existing data?#

A: You can import from SQL dumps, use replication, or restore from backups. See Creating Databases guide.

Q: Which database should I choose?#

A: PostgreSQL is recommended for most use cases. Choose MongoDB for document data, MySQL for WordPress, Redis for caching.

Q: Can I have multiple databases?#

A: Yes, create as many databases as you need. Each has independent backups and scaling.

Q: How long do backups keep?#

A: Automatic backups kept 7-30 days. Manual backups kept as long as you specify. Exported backups stored indefinitely.


Connection Methods#

Connection String#

PostgreSQL: postgresql://root:pass@hostname:5432/database
MySQL: mysql://root:pass@hostname:3306/database
MongoDB: mongodb://root:pass@hostname:27017/database
Redis: redis://root:pass@hostname:6379

Environment Variables#

export DB_HOST="db-prod.nifetency.com"
export DB_PORT="5432"
export DB_USER="root"
export DB_PASSWORD="secure-password"
export DB_NAME="myapp"

Docker Compose#

services:
app:
environment:
DB_HOST: db-prod.nifetency.com
DB_PORT: 5432
DB_USER: root
DB_PASSWORD: secure-password

Connection Pooling#

Reuse connections for better performance and lower resource usage


Performance Optimization#

Monitor Key Metrics#

  • CPU usage (target: < 70%)
  • Memory usage (target: < 70%)
  • Disk usage (target: < 80%)
  • Query performance (identify slow queries)

Optimization Tips#

  1. Add indexes to frequently queried columns
  2. Optimize slow queries using EXPLAIN
  3. Archive old data regularly
  4. Enable connection pooling
  5. Use read replicas for heavy read workloads

Scaling Strategy#

  • Start small: 5-10 GB for most projects
  • Monitor growth: Track disk/CPU usage
  • Scale early: Don't wait until limits
  • Test scaling: Use staging before production
  • Plan replicas: For high availability

Security Best Practices#

1. Access Control#

  • Change default passwords immediately
  • Use strong, complex passwords
  • Create app-specific users (not root)
  • Enable SSL/TLS for all connections

2. Network Security#

  • Use VPC/private networks when possible
  • Whitelist application IPs
  • Enable firewall rules
  • Audit access logs

3. Data Protection#

  • Enable encryption at rest
  • Use SSL for all connections
  • Regular backup testing
  • Comply with regulations (GDPR, HIPAA, etc.)

4. Monitoring & Alerts#

  • Monitor connection count
  • Alert on high CPU/memory
  • Track slow queries
  • Review audit logs

Database Comparison#

FeaturePostgreSQLMySQLMongoDBRedis
TypeRelationalRelationalDocumentKey-Value
Use CaseComplex queriesWeb appsFlexible dataCaching
ACID✅ Full✅ Full✅ 4.0+❌ No
Transactions✅ Full✅ Full✅ Full⚠️ Limited
SchemaFixedFixedFlexibleN/A
Learning CurveModerateEasyEasyVery easy

Quick Links#

Guides#

Related Documentation#

Tools & Resources#

  • DBeaver - Free database client (PostgreSQL, MySQL)
  • MongoDB Compass - Official MongoDB GUI
  • Redis Desktop Manager - Redis client
  • RedisInsight - Official Redis UI

Support#

Need help with databases?


What's Next?#

Ready to get started? Follow these steps:

  1. Create your first database - 5 minutes
  2. Connect your application - 10 minutes
  3. Set up monitoring - 5 minutes
  4. Test backup & recovery - 15 minutes

Estimated total time: 35 minutes to production-ready database!