Skip to content
← All guides

Devora Cloud · Blog

Scalability, load balancing and failover: how your site survives traffic spikes

The difference between failover, load-balancing replicas and autoscaling on Devora Cloud, what they cost and what to change in your code so your site handles traffic spikes.

Load balancerHTTPSPrimaryAMD EPYCReplica 1AMD EPYCReplica 2AMD EPYCStopped failoveron another serverfailover: starts if the primary goes downCPUCPU threshold → +1 replicaPostgreSQLsame databaseRedissessionsS3files
Technical illustration. Features and regions depend on the plan, availability and application compatibility.

A campaign goes viral, Black Friday arrives, an influencer mentions you: traffic spikes rarely send a warning. If your site depends on a single server, two things can go wrong at once: the machine cannot keep up, or it simply stops.

Scalability is the ability to serve more people without going down. On Devora Cloud it rests on three different pieces — failover, load-balancing replicas and autoscaling — and it is worth understanding each one before you pay for anything.

Failover: the backup plan every project already has

Every project on Devora Cloud, including on the Hobby plan, has a failover replica. It sits stopped on another server, ready to step in. If the primary instance fails, the failover replica starts and takes over. When the primary comes back, the failover replica is stopped again.

Because it is stopped during normal operation, this replica does not share traffic or add capacity. Its job is different: to shorten downtime when a server has a problem.

  • Included in every plan at no extra cost.
  • Lives on another server, not on the primary’s machine.
  • Starts only when the primary fails and stops when it returns.

Load balancing: several copies sharing the traffic

On every plan you can add scaling replicas, billed by the hour. Each replica is a running copy of your application, the same size as your plan, and the load balancer spreads requests across the healthy copies. If one of them has a problem, the others keep serving.

All replicas use the project’s same database and the same S3. In other words, you gain processing capacity, not a new database.

  • Hobby: up to 2 copies running at once.
  • Pro: up to 3 copies running at once.
  • Enterprise: up to 5 copies running at once.
  • First extra replica: the plan’s full price, per hour.
  • Load balancing: full hourly price for every copy; with autoscaling, 10% off from the next extra copy on.
  • Billed per hour, only while the replica is running.

An example on the Pro plan (US$ 20 per month): the first replica costs the equivalent of US$ 17 if it runs the whole month, and each further replica US$ 15. If you run a replica only during a three-day campaign, you pay only for those hours.

Autoscaling: replicas that start when CPU climbs

Autoscaling is available on every plan and billed by the hour while the extra copies run. You set a CPU usage threshold; when the application goes above it, the platform starts another replica, up to the maximum your plan allows. When demand drops, the extra copies are no longer needed and are stopped.

It is the right choice for irregular traffic: you do not keep copies running overnight, and you do not have to rush to add capacity when the spike hits.

Failover, load balancing or autoscaling?

FailoverLoad-balancing replicasAutoscaling
PurposeStay online if the primary failsSplit traffic across copiesStart copies when CPU climbs
PlansAllAllAll
Day to dayStopped, on another serverRunning, receiving trafficStarts and stops with CPU
CostIncludedFull hourly price, no discountHourly, only while the clone runs: 1st at full price, 10% off from the next one

In practice the three add up: failover protects against a server going down, replicas give steady headroom and autoscaling covers the peaks.

What needs to change in your code

Replicas only work well when the application does not keep state on its own machine. Each request may land on a different copy, so:

  • Store login sessions in Redis (or the database), not in process memory, so users stay signed in on any replica.
  • Send user uploads to S3, never to the container disk. The disk is not shared between replicas.
  • Coordinate scheduled jobs (cron, queues) so they do not run once per copy.
  • Keep configuration in environment variables, identical for every replica.

PostgreSQL or Redis is included in every plan (Hobby 1 database, Pro 2, Enterprise 4), and each project’s private S3 is ready to receive files.

AMD EPYC servers: the size of each copy matters

Applications run on servers with AMD EPYC processors in the USA. Each replica has the same CPU and memory limits as the plan: adding replicas increases total capacity, but it does not make an individual copy more powerful.

So the usual order is: first make sure the code is efficient, then choose the plan with the right size per copy, and only then multiply the copies. If the app uses a lot of memory per request, moving up a plan helps more than adding small replicas.

For visitors in Brazil, Devora’s own CDN cache speeds up content delivery, but it does not run the application: processing stays on the US servers.

Frequently asked questions

Does the Hobby plan include load balancing?

Yes. Hobby has failover included and also load balancing and autoscaling, billed by the hour, with up to 2 running copies of 0.5 vCPU and 512 MB.

Does each replica get its own database?

No. All replicas use the project’s same database and S3. Application replicas do not copy the database.

Do I pay for the failover replica?

No. It is included in every plan, from Hobby to Enterprise.

How do I know whether I need replicas or a bigger plan?

Check the metrics. CPU high for long periods calls for more copies or more vCPU; memory at the limit plus restarts calls for a plan with more RAM. Our guide on slow sites explains how to read those signals.

Scalability, load balancing and failover: how your site survives traffic spikes · Devora Cloud