Setting Up DO Managed Databases: PostgreSQL, MySQL, Redis, MongoDB

A self-hosted database on a server requires constant attention: updates, backups, fault tolerance, and late-night troubleshooting. We set up managed databases turnkey — from auditing the current schema to handover to operations with runbooks. The team stops wasting time on routine tasks, and services get predictable availability and fast recovery.

Our competencies:

Frequently Asked Questions

Latest works

  • Development of a web application for FEEDME
    Development of a web application for FEEDME
    1365
  • Development of an online store for the company FURNORO
    Development of an online store for the company FURNORO
    1330
  • B2B Advance company logo design
    B2B Advance company logo design
    776
  • Development of a web application for Enviok
    Development of a web application for Enviok
    1077
  • AIDER company logo development
    AIDER company logo development
    1022
  • CRM development for Chasseurs
    CRM development for Chasseurs
    1113

Configuring DigitalOcean Managed Databases: Typical Failures

A managed database relieves the team of server maintenance, but it does not eliminate configuration.

By default, a cluster accepts a limited number of concurrent connections, and an application that opens a connection for every request hits this limit sooner than it hits CPU or disk.

Nightly jobs, the monitoring dashboard, and analytics exports consume the remainder, and at peak some requests fail with a connection refusal — even though there is still resource headroom.

The second typical failure point is replication failure. The replica begins to lag, reads go to it and return stale data: the user sees a canceled order or an old balance, and support deals with the discrepancy manually.

If backups were created manually or were never tested for restore, database downtime turns into a window of indeterminate length: it is unknown which point to restore to and how much data has been lost.

At peak this adds up to a cascade: connection failures, growing response time, erroneous figures in reports from a lagging replica.

We explain how this is closed by configuring managed databases DigitalOcean — from connection mode and replica lag control to a recovery procedure that is tested, not assumed.

What a Managed Database Gives You Instead of Your Own Server

The difference between a managed database and a server under your own supervision is not the convenient panel, but which operations disappear from the team's calendar.

Database backups run on a schedule and are stored separately from the primary node, and the restore point is chosen at an arbitrary moment within the retention window, not just the latest nightly snapshot.

A restore can be run into a separate cluster and the data verified before replacing the production database.

Cluster fault tolerance rests on a replica in another zone: if the primary node is lost, failover happens automatically, and the application reconnects to the same address.

The difference is visible during an incident — instead of downtime while the on-call engineer reads logs and deploys a copy, there is only a short burst of errors at the moment of failover.

Load monitoring is collected continuously: active connections, query queue, data growth, read and write latency. Metrics show approaching the limit in advance, so scaling resources becomes a planned operation without manual data migration and without stopping the application.

The provider applies updates and maintenance itself in an agreed maintenance window — on our side, control of the schema, indexes, and heavy queries remains.

In DigitalOcean, these are managed clusters for PostgreSQL, MySQL, Redis, and MongoDB: backups, failover, and scaling are part of the scope, rather than assembled manually from scripts.

The result is measurable — recovery is measured in minutes instead of hours, no manual maintenance operations remain, and cluster resilience stops depending on who is on call today.

Deployment Modes and Isolation Levels

The deployment mode determines not only fault tolerance but also which operations remain inexpensive: backups, point-in-time rollback, and offloading reads to additional nodes.

A managed database platform covers maintenance, updates, and monitoring, but the choice — single node, node with a hot standby, or cluster with replicas — remains an architectural decision, and we fix it before deployment.

Access is the second axis. A private network keeps database traffic within a dedicated perimeter; public access requires trusted sources and channel encryption; in production, both are usually left in place, but public access is closed for everything except export endpoints.

The transaction isolation level is changed via a cluster parameter: by default, readers are not blocked, but for consistent reports, repeatable read is set — and then the share of write conflicts grows.

Mode When It Fits Limitations
Single node Development, internal services where downtime is acceptable Failure and planned maintenance mean downtime; rollback only to the latest backup
Node with hot standby Production without the right to a long pause The standby does not serve reads; failover takes tens of seconds, clients reconnect
Cluster with read replicas Reporting and heavy queries alongside transactions Replication lags, some data on the replica becomes stale; writes are not accelerated
Private network All databases accessed by services inside the perimeter Applications must live in the same perimeter; external integrations go through a gateway
Public access External contractors, exports, one-time migrations Trusted sources and encryption are required; a larger attack surface

We do not mix modes arbitrarily: for each database we fix one profile, and exceptions — such as temporary public access for a migration — are opened on a schedule and closed automatically.

Work Order: From Audit to Handover to Operations

Each stage ends with a verifiable artifact — a diagram, configuration, test report — and not a "done" status. Below is the route we follow when configuring managed databases: from inventorying the current installation to handover with a maintenance procedure.

  1. Infrastructure audit. We capture the load profile: versions and extensions, working set size, read-to-write ratio, daily peaks, number of concurrent connections, current state of backups and restore points. The output is a report with bottlenecks and a list of risks.
  2. Deployment diagram. We determine the region and availability zones, number of nodes and read replicas, placement of the cluster in the private network, application connection endpoints, and network access rules. The diagram is agreed before resources are created.
  3. Database parameter configuration. We select connection limits and pool, cache sizes, timeouts, autovacuum and log retention policy, replication mode, and encryption. Everything is fixed in configuration, not in verbal agreements.
  4. Migration and switchover. We transfer data using logical replication or a dump, rehearse switchover on a staging environment, and prepare a rollback route to the previous installation. The maintenance window is agreed in advance and kept short.
  5. Fault tolerance testing. We deliberately take a node out, disable a replica, restore a backup on a separate staging environment — and measure the actual recovery time. The result is documented in a report, not a promise.
  6. Observability. We configure metrics, slow query reports, and alerts with thresholds for load, connections, and disk space, so degradation is visible before failure.
  7. Handover to operations. We provide the deployment diagram, final configurations, backup policy, access matrix, and standard operating procedures. We remain available for support and planned changes.

Configurations, Diagrams, and Procedures Delivered

Configuring the cluster is half the work. The other half is a set of settings and documents that your team uses to operate the databases itself: without messaging us and without trying to reconstruct the logic from change history.

  • Cluster parameters: node roles, instance class, version branch, extension set, time zone, and concurrent connection limit — documented in writing, not in chat.
  • Database schema: list of tables, indexes, and relationships, migrations in the repository, and the order in which they are applied on staging and in production.
  • Access rules: separate accounts for the application, analytics, and on-call engineer, permission separation, mandatory channel encryption, and a list of trusted addresses.
  • Network diagram: private perimeter, entry points, what is exposed externally and what is available only internally — with justification for each exception.
  • Backup procedure: frequency, retention depth, maintenance window, and mandatory restore validation of the backup.
  • Recovery instruction: step-by-step restore to the required point in time and rollback to the previous snapshot — with the initiator and trigger criteria.
  • Failure alerts: set of metrics and thresholds, delivery channels, escalation procedure to the responsible engineer.

The package is completed by access handover and a short training session for the on-call shift.

We test backups in drills: we deploy the database from backup in a separate perimeter and measure time to readiness — if it does not fit the target, we rewrite the procedure before handover.

Case Study: Migrating a Cluster to a Managed Database Without Downtime

The cluster ran on its own servers: one primary, two replicas, and role switching was performed manually according to a wiki instruction. A primary failure meant waking the on-call engineer at night, manually checking replication positions, and stopping writes for 40 minutes.

Migration Without Stopping Writes

We migrated to a managed database DigitalOcean without downtime. We brought up the target database alongside, enabled streaming replication, verified checksums by table, and rehearsed the switchover twice on a copy of production traffic.

The final migration was done in a low-load window: writes were stopped for seconds, we waited for zero replica lag, switched the application, and left the previous database as a hot standby for rollback.

We captured metrics for the same period before and after:

  • recovery time after primary failure: 40 minutes → less than two, replica failover is handled by the platform;
  • share of request failures at peak load: 3–4% → fractions of a percent;
  • share of manual operations during failure: almost all → only updating connection strings;
  • nighttime calls to the on-call engineer: several per month → none in a quarter.

The fallback perimeter was kept enabled: if data diverged in the first weeks, we could return to the previous database without losing what was written. The replication diagram, switchover procedure, and set of checks were handed over to the team's documentation.

How a Managed Database Differs from a Database on Your Own Server

A managed database is primarily a separation of responsibility.

The provider, for example DigitalOcean, takes on the infrastructure layer: placement on an isolated node, replication, backups with point-in-time recovery, minor security patches, availability monitoring, and automatic failover to a standby node if the primary fails. The team receives a connection string and works with data, not with the server.

On the development side, everything that determines data behavior remains: schema and migrations, indexes, query plans, connection pool, role permissions, slow query analysis, and load testing.

No one will rewrite a heavy table join for you — fault tolerance and performance are different tasks.

Version updates work like this: patches are applied automatically during the maintenance window, the major branch is chosen by the team. Checking application compatibility, running migrations on a copy, and the switchover moment are on you. On your own server, you also add operating system updates with manual control to this.

Configuration options are limited deliberately: there is no access to the file system or superuser rights, some engine parameters are closed, and the extension set is fixed.

If a non-standard parameter is needed — either a dedicated cluster with agreed settings, or your own server, where your team and its time are responsible for everything.

You should count not 'more expensive or cheaper,' but how many engineering hours per month go into operations and how much downtime you allow.

Technical Doubts: Access, Backups, Limitations

A managed database relieves the team of operations, but adds constraints that people stumble over at the start. Below are the objections that most often come up when configuring managed databases DigitalOcean.

Can engine parameters be edited manually?

Some — yes: connection, timeout, and planner parameters are exposed in the cluster settings and can be changed without a restart. The rest is closed, and this is a deliberate trade-off for the provider handling replication, fault tolerance, and updates.

If the architecture requires a superuser or non-standard extensions, we determine this before migration, not after.

Does the database need to be exposed to the internet?

By default, no: the cluster lives in a private network, and the application connects via an internal address.

From the outside, access is restricted by a list of trusted addresses, and public access is opened only if there is an external consumer — with channel encryption and a separate role with minimal privileges.

How does point-in-time recovery work?

A scheduled snapshot provides the state at the moment of backup, while a continuous change log allows rolling the cluster back to the required second within the retention window. Recovery always deploys a new instance — production is not overwritten.

We run the procedure on staging in advance so we are not figuring out the procedure during an outage.

What about versions, updates, and permissions?

The provider installs minor updates during the agreed maintenance window, and major ones only after your confirmation. Before upgrading, we bring up a copy, run queries on it, and check extension compatibility, then agree on a date.

We separate access by role: the application gets a working user, analytics gets a separate read-only one.

Let's Discuss the Task and Come Back with an Estimate and Plan

The estimate is based on inputs, not guesses.

To make the configuration of managed databases DigitalOcean based on calculation, send us the current service diagram and how they access the database, approximate data volumes and daily load profile, availability requirements, and windows when maintenance is acceptable. This is enough to choose a deployment option, estimate the scope of work, and provide timelines.

What is included in the work plan and in what form we deliver the result:

  • Analysis of the current perimeter: where a single connection holds all writes, which queries degrade first, what in the database configuration is set by default and does not fit your load.
  • Scope of work for the cluster, replicas, backups, access roles, and monitoring — with an explicit list of what remains on your side.
  • Implementation timelines by stage: what is rolled out without downtime, what requires a maintenance window, which stage blocks the others, and where the handover boundary lies.
  • Failure testing before acceptance: forced failover to a replica and restore from backup with time measurement — the figures are recorded in the acceptance report.
  • Documentation handover: staging diagrams, configuration parameters, backup and alert policies, and instructions for the on-call shift.
  • Access handover and walkthrough with your team: who changes what, how a release is rolled back, and where to look in the first minutes after a failure.

Describe the task — we will come back with an estimate, work plan, and timelines, without general phrases.