Hardware FixRecommendedDevice not working? Your driver may be the problemCheck updates for common hardware issues.Fix DriversOctober DealsAmazon USOctober deal check: compare before you payAmazon US: current deals, useful picks and tech finds.Check DealsPC HealthRecommendedCrashes, freezes, slowdowns? Check your PC nowSpot repairable issues before they interrupt work.Check PC×
Skip to content
VGSources
Blog

Can You Run One Website Across Two Servers? A Practical High-Availability Setup Guide

Yes, one website can run across two servers—but only when a routing layer selects healthy origins and the application’s database, files and sessions are shared or replicated. This guide covers active-active and active-passive designs, NGINX configuration, managed edge pools, Route 53 failover and practical testing.
Length12 min Posted Quest giverVGSources Team
Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Yes. Publish one hostname and put a routing layer in front of two equivalent origin servers. That layer can be an NGINX reverse proxy, a managed edge load balancer such as Cloudflare Load Balancing, or health-checked DNS failover with Amazon Route 53.

The difficult part is not pointing a domain at two machines. Both origins must run the same deployable application, and mutable data—database records, uploads, sessions, carts and generated files—must be shared or replicated. Without that, traffic can switch successfully while users still see missing data or conflicting writes.

As an Amazon Associate I earn from qualifying purchases.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

What “one website on two servers” actually means

A visitor requests one public hostname, such as www.example.com. A routing layer receives that request and selects Server A or Server B, each acting as an origin. The visitor normally sees one URL and does not need to know which origin answered.

You can run the origins in two broad modes:

Mode Traffic pattern Why choose it What it requires
Active-active Both healthy origins serve requests at the same time More usable capacity and concurrent availability Stateless request handling, shared data services and safe concurrent writes
Active-passive A primary serves traffic; a standby receives traffic only after failure Simpler write behavior and a controlled failover path A synchronized standby and monitoring that can promote it

Two web servers do not automatically create high availability. If both depend on one database, one file share, one proxy or one power circuit, that dependency can still take the site down. A resilient design treats compute, routing, data, cache and storage as separate layers and decides which of each layer must also be redundant.

#1 Best Overall
Sale
TP-Link ER605, Wired Gigabit VPN Router | Up to 3 WAN Ethernet Ports + 1 USB WAN, SPI Firewall SMB Router, Omada SDN Integrated, Load Balance, Lightning Protection
  • 【Five Gigabit Ports】1 Gigabit WAN Port plus 2 Gigabit WAN/LAN Ports plus 2 Gigabit LAN Port. Up to 3 WAN ports optimize bandwidth usage through one device.
  • 【One USB WAN Port】Mobile broadband via 4G/3G modem is supported for WAN backup by connecting to the USB port. For complete list of compatible 4G/3G modems, please visit TP-Link website.
  • 【Abundant Security Features】Advanced firewall policies, DoS defense, IP/MAC/URL filtering, speed test and more security functions protect your network and data.
  • 【Highly Secure VPN】Supports up to 20× LAN-to-LAN IPsec, 16× OpenVPN, 16× L2TP, and 16× PPTP VPN connections.
  • Security - SPI Firewall, VPN Pass through, FTP/H.323/PPTP/SIP/IPsec ALG, DoS Defence, Ping of Death and Local Management. Standards and Protocols IEEE 802.3, 802.3u, 802.3ab, IEEE 802.3x, IEEE 802.1q

Choose the routing layer

The routing layer is the component that turns one hostname into a decision about which origin should receive a request. Choose it according to how quickly you need failure detection, how much infrastructure you want to operate and whether you need active-active distribution.

Reverse proxy or self-managed load balancer

An NGINX instance can expose the public virtual host and proxy requests to an upstream pool containing both origins. Open-source NGINX supports round-robin, least-connected and IP-hash selection, with passive failure handling. NGINX Plus adds active health checks and session-persistence features.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

This approach gives you precise control over headers, TLS termination, retry behavior, connection limits and traffic splitting. It also creates another component that must be made redundant. If the only proxy is on one virtual machine and that machine fails, both healthy origins become unreachable. Run redundant proxies, use a managed service, or accept that the proxy is a single point of failure.

Managed edge load balancing

A managed edge service monitors origin endpoints from its network and steers requests to healthy pools. Cloudflare Load Balancing models an active-active pool with multiple endpoints, or an active-passive design with primary and secondary pools. You configure a monitor, expected response codes, timeout, retry behavior and check interval.

The provider operates the edge fleet and health-check distribution, which reduces your proxy-maintenance burden. The trade-offs are a recurring service charge, dependence on that provider and the need to understand exactly how its monitor, retry and failback policies behave.

DNS health-check failover

Amazon Route 53 can associate health checks with primary and secondary failover records. When the primary is unhealthy, DNS answers can direct new lookups to the secondary. Weighted records can distribute traffic among multiple healthy resources instead of using a strict primary/secondary relationship.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

DNS failover is attractive for a simple active-passive design, but DNS answers are cached by resolvers, operating systems and browsers. A record change therefore cannot remove every visitor from the failed origin instantly. The practical recovery time depends on resolver behavior and the TTL you publish, not only on the health-check interval.

Rank #2
Omada ER707-M2, Multi-Gigabit VPN Route
  • 【Flexible Port Configuration】1 2.5Gigabit WAN Port + 1 2.5Gigabit WAN/LAN Ports + 4 Gigabit WAN/LAN Port + 1 Gigabit SFP WAN/LAN Port + 1 USB 2.0 Port (Supports USB storage and LTE backup with LTE dongle) provide high-bandwidth aggregation connectivity.
  • 【High-Performace Network Capacity】Maximum number of concurrent sessions – 500,000. Maximum number of clients – 1000+.
  • 【Cloud Access】Remote Cloud access and Omada app brings centralized cloud management of the whole network from different sites—all controlled from a single interface anywhere, anytime.
  • 【Highly Secure VPN】Supports up to 100× LAN-to-LAN IPsec, 66× OpenVPN, 60× L2TP, and 60× PPTP VPN connections.
  • 【5 Years Warranty】Backed by our 5-years warranty and free technical support from 6am to 6pm PST Monday to Fridays
Question Reverse proxy Managed edge DNS failover
Where is the decision made? At your proxy or load balancer At the provider’s edge By recursive DNS resolvers using DNS answers
Typical control Detailed request-level policy Provider steering and pool policy Record-level primary/secondary or weighting
Failure reaction Can stop sending new requests as soon as checks mark an origin unhealthy Depends on monitor and edge policy Constrained by DNS caching
Operational burden You operate and make the proxy redundant Lower infrastructure burden, recurring provider cost Simple routing, but less request-level control

Make both origin servers equivalent before adding traffic

Start with Server A and Server B as interchangeable copies. A deployment that works only on one machine is not ready for active-active traffic or automatic failover.

  • Application: deploy the same commit or release artifact, dependency versions and runtime.
  • Web server: use the same virtual-host definitions, compression rules, timeout values and security headers.
  • TLS: install the same certificate chain and compatible protocol and cipher policy, or terminate TLS at the routing layer and secure the proxy-to-origin hop separately.
  • Configuration: keep environment variables, feature flags, secrets and service endpoints consistent. Store secrets in a controlled secret manager rather than hand-editing one host.
  • Firewall: permit the routing layer’s health-check and proxy addresses to reach both origins, while blocking unintended direct public access if the architecture does not require it.
  • Deployment: use repeatable automation or configuration management, then detect drift. A manual emergency fix on only Server A is a future failover incident.

Give each origin a direct test hostname or private address so you can verify it independently before placing it in the pool. Confirm that the same URL returns the same application version, headers and static assets from both machines.

Externalize every piece of mutable state

Routing works only when a request can land on either origin without losing information created by a previous request. Treat the web tier as disposable compute.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Database

Keep the authoritative database outside the two web servers. Use a managed or replicated database appropriate for the application, and define how writes behave during a partition or failover. A multi-availability-zone database can provide automatic failover and synchronous replication, but cross-zone communication may add latency compared with a single-zone deployment.

Do not let Server A write to a local database while Server B writes to another local database unless the application and database technology explicitly provide safe replication and conflict handling. “Both servers have a database” is not the same as one consistent data store.

Uploads and generated files

User-uploaded images, downloadable files, themes, plugins and generated reports must be available to either origin. Use shared filesystem storage or an object-storage service, and make the application read and write through that common location. A local uploads directory on each server creates split-brain content: a visitor may upload to A and then receive a 404 when the next request reaches B.

Sessions, carts and authentication

Prefer stateless requests with sessions stored in a shared database or cache. Signed client-side sessions can work when their size, key rotation and revocation behavior fit the application. IP-hash routing or another sticky-session mechanism can keep a user on one origin temporarily, but it reduces scheduling freedom and does not replicate data. If the origin fails, the user can still lose the session unless the session store is external.

What’s actually slowing this PC down?

Pick the symptom - the matching free tool is one click away.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Cache and background work

Use a shared cache when cache coherence matters, or design each cache as disposable and safe to rebuild. Ensure scheduled jobs, queues and email workers do not run twice when both origins are active. Use a distributed lock, a dedicated worker tier or an idempotent job design so a failover does not duplicate charges, messages or imports.

Rank #3
Sale
TP-Link ER7206, Multi-WAN Professional Wired Gigabit VPN Router | Increased Network Capacity, SPI Firewall, Omada SDN Integrated, Load Balance, Lightning Protection
  • 【Flexible Port Configuration】1 Gigabit SFP WAN Port + 1 Gigabit WAN Port + 2 Gigabit WAN/LAN Ports plus1 Gigabit LAN Port. Up to four WAN ports optimize bandwidth usage through one device.
  • 【Increased Network Capacity】Maximum number of associated client devices – 150,000. Maximum number of clients – Up to 700.
  • 【Integrated into Omada SDN】Omada’s Software Defined Networking (SDN) platform integrates network devices including gateways, access points & switches with multiple control options offered – Omada Hardware controller, Omada Software Controller or Omada cloud-based controller(Contact TP-Link for Cloud-Based Controller Plan Details). Standalone mode also applies.
  • 【Cloud Access】Remote Cloud access and Omada app brings centralized cloud management of the whole network from different sites—all controlled from a single interface anywhere, anytime.
  • 【SDN Compatibility】For SDN usage, make sure your devices/controllers are either equipped with or can be upgraded to SDN version. SDN controllers work only with SDN Gateways, Access Points & Switches. Non-SDN controllers work only with non-SDN APs. For devices that are compatible with SDN firmware, please visit TP-Link website.

Step-by-step: an NGINX reverse-proxy design

1. Prepare private origin addresses

Assume the proxy can reach Server A at 10.0.0.11 and Server B at 10.0.0.12 on an internal network. Each origin should answer the same application port and expose a health endpoint such as /healthz. The addresses are examples; use addresses from your own network.

2. Define the upstream pool

On the proxy, place both origins in an upstream block and proxy the public virtual host to it:

upstream website_origins {
    server 10.0.0.11:8080;
    server 10.0.0.12:8080;
    # least_conn;       # choose instead of round robin when justified
    # ip_hash;          # use only when temporary affinity is necessary
}

server {
    listen 443 ssl;
    server_name www.example.com;

    location / {
        proxy_pass http://website_origins;
        proxy_set_header Host $host;
        proxy_set_header X-Real-IP $remote_addr;
        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
        proxy_set_header X-Forwarded-Proto $scheme;
    }
}

Round-robin is the default selection method. Least connections can help when requests have very different durations. IP hash may preserve affinity for legacy applications, but it can overload one origin and does not solve shared-state problems.

Free tools Windows power users keep installed

One-click scans. No signup required.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

3. Configure failure handling

Open-source NGINX can passively notice failed connection attempts and temporarily avoid an origin. NGINX Plus supports active checks that periodically send requests and stop routing to an unhealthy upstream. Its documented default active-check interval is five seconds; treat that as a product default, not a guaranteed recovery time. Tune intervals, failure thresholds and retry behavior for your application and test the resulting behavior.

4. Make the proxy redundant

Use two proxy instances behind a provider-managed address, a redundant virtual IP or another mechanism appropriate to your network. If you keep one proxy, document it as a single point of failure rather than calling the complete design highly available.

5. Publish the hostname

Point the public DNS record at the proxy address, not directly at both origin servers. Keep direct origin access private where possible. If clients can bypass the proxy, they also bypass its TLS policy, health checks, rate limits and failover decisions.

Step-by-step: a managed edge pool

  1. Create a monitor for the application protocol and port. Select a path that returns a success response only when the origin should receive real user traffic.
  2. Add Server A and Server B as endpoints in a pool. Set the expected status code, timeout, retry count and check interval. A static file check proves only that a web process is listening; a dependency-aware endpoint can also verify the database or cache, but it must remain lightweight and safe to call frequently.
  3. Choose active-active steering when both origins can handle all requests, or create primary and secondary pools for active-passive service.
  4. Attach the hostname to the load-balancing policy and verify that the edge presents the intended TLS certificate.
  5. Review monitor events and origin logs together. Confirm that a failed check removes only the bad endpoint and that recovery does not create a sudden request spike beyond the origin’s capacity.

Monitor intervals vary by plan, so the configured interval is not a universal promise of failover speed. Measure the behavior of the plan and policy you actually use.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Step-by-step: Route 53 DNS failover

  1. Create a health check for the primary endpoint using the correct protocol, port and path. The endpoint should return success only when the server can serve users.
  2. Create a failover record for the primary hostname and mark it primary. Create a matching record for the backup endpoint and mark it secondary.
  3. Set a TTL appropriate to your tolerance for resolver caching. A shorter TTL can reduce stale answers but does not force every resolver to discard an already cached response.
  4. Test by stopping or draining the primary, observing the health-check state, and querying through more than one recursive resolver. Record how long existing clients continue to use the old address.
  5. Restore the primary and verify whether traffic returns automatically or requires the policy’s configured recovery behavior.

Use weighted records instead when you intentionally want both healthy endpoints to receive traffic. DNS weighting is not a substitute for application-level state sharing or an origin health policy.

Design the health endpoint carefully

A health check is a traffic decision, not merely a process check. A useful endpoint normally verifies that the web process is responsive and, when those dependencies are essential, that the application can reach its database, cache or required storage. Keep the check fast and read-only.

  • Return a success status only when the origin should receive new requests.
  • Return a failure status during a controlled drain so the router can move traffic before maintenance.
  • Do not expose credentials, stack traces or detailed dependency errors in the public response.
  • Log check failures separately from ordinary user requests so operators can distinguish an origin outage from a bad monitor path.

Checking too little can send users to an origin that serves error pages. Checking too much can mark a server unhealthy because of a noncritical dependency or create unnecessary load.

Active-active or active-passive?

Choose active-active when

  • Both origins have enough capacity for normal traffic and a failover surge.
  • Requests are stateless or all session and cart data is externalized.
  • The database and file layers support concurrent access and clear consistency rules.
  • You want to use both servers’ capacity instead of leaving one mostly idle.

Choose active-passive when

  • The application has difficult write coordination or legacy local-state assumptions.
  • You prefer one controlled writer and can accept unused standby capacity.
  • Your operational process can keep the standby synchronized and regularly tested.

Active-passive is simpler, not automatically safer. An untested standby can fail when promoted because its software, credentials, certificates or data replica is stale.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

Test failover before calling it reliable

Run a controlled exercise with monitoring and alerts enabled:

  1. Confirm both origins are healthy and record baseline response behavior.
  2. Drain or stop Server A without changing the other layers.
  3. Verify that new requests reach Server B, authenticated sessions remain valid, uploads are visible and writes appear exactly once.
  4. Check that the routing layer raises an alert and that logs identify the failed origin.
  5. Restore Server A, leave it out of rotation until its application, data access and health endpoint are verified, then allow gradual re-entry if your router supports it.
  6. Repeat the exercise in the opposite direction.

No generic two-server design has a universal recovery-time guarantee. Measure detection, decision, DNS propagation where applicable, connection draining and application recovery in your own environment.

Common mistakes and fixes

Putting two A records in DNS and stopping there

Multiple addresses can distribute some lookups, but ordinary DNS does not know whether an origin is serving valid pages. Resolver caching also makes removal unpredictable. Use a health-aware edge or proxy when rapid, controlled failover matters.

Best Value
Sale
Cudy Gigabit Multi-WAN Router, OpenWRT, Load Balance, 5X GbE, R700 | OpenWRT-ready Multi-WAN tunnel gateway, 5x GbE ports, WireGuard/OpenVPN/IPsec, traffic Balancing, Failover, VLAN, QoS
  • Multi-WAN Business Continuity: Connect up to 5 ISPs with automatic failover and load balancing — if one connection drops, traffic instantly reroutes to keep your business, remote office, or home lab online
  • OpenWRT-Ready Enterprise Control: Full OpenWRT support unlocks VLAN segmentation, advanced firewall rules, custom QoS policies, and community-developed packages for professional-grade network management
  • Complete VPN Gateway Suite: WireGuard, OpenVPN, IPsec, PPTP, and L2TP server and client built in; create site-to-site tunnels, host remote access, or route specific VLANs through encrypted VPN connections
  • Professional Security Stack: SPI firewall, DoS attack prevention, IP/MAC binding, domain filtering, and DMZ hosting protect your network perimeter while keeping critical services accessible
  • Flexible Deployment & Monitoring: Web GUI or Cudy App cloud management with TR-069 support; built-in diagnostic tools (Ping, Traceroute, NSLookup, system logs) for rapid troubleshooting anytime

Replicating code but not uploads

Deployment synchronization does not copy user-generated files created after deployment. Move those files to shared storage and test a write on one origin followed by a read on the other.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Using sticky sessions as the architecture

Affinity can mask missing shared session storage while both origins are healthy. It also concentrates users and fails when the sticky origin disappears. Externalize sessions, then remove affinity unless a specific legacy constraint justifies it.

Checking only that port 80 is open

A listening web process can still have a broken database connection or invalid application configuration. Make the health endpoint represent the minimum conditions required to serve traffic.

Forgetting the routing layer’s own failure mode

Two origins behind one unprotected proxy still have one public failure point. Add redundant proxies or use a managed edge service, and include that layer in failure drills.

Assuming failover means data consistency

Routing changes where requests go; it does not reconcile divergent databases, files or queues. Define replication, conflict handling, backup and restore procedures separately.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Capacity, cost and performance expectations

Two servers can increase available capacity and reduce the impact of one origin failure, but there is no universal throughput multiplier or uptime percentage for this pattern. Results depend on application workload, database limits, network paths, health-check policy and the capacity of the routing layer.

Budget for more than the second web server. Costs can include redundant proxy or edge service fees, shared storage, database replication, backups, monitoring, transfer and engineering time for deployment automation and drills. A managed edge or managed database trades some infrastructure work for recurring service cost and provider dependency.

“Load balancing across multiple application instances is a commonly used technique for optimizing resource utilization, maximizing throughput, reducing latency, and ensuring fault-tolerant configurations.” — NGINX documentation, Using nginx as HTTP load balancer

A practical decision checklist

  • Can either origin serve the same release with the same configuration and secrets?
  • Are database writes handled by a shared or properly replicated data layer?
  • Are uploads, generated files, sessions and carts available from either origin?
  • Does the health endpoint detect the failures that should remove an origin from service?
  • Is the proxy, edge service or DNS policy itself redundant enough for your availability target?
  • Have you tested drain, failure, alerting, recovery and re-entry in both directions?
  • Have you documented the observed failover behavior rather than assuming an advertised interval is a recovery guarantee?

Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Leave a Reply

Your email address will not be published. Required fields are marked *

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

More quests from Patch Notes

  1. How to Set Up a RedM (RDR2) Server in 2026: License Key, txAdmin and server.cfg, Step by StepBlog11min
  2. Best RedM (RDR2) Server Hosting in 2026: Comparing Four Hosts on Slots, Memory and PriceBlog10min
  3. How to Host a Mindustry Server in 2026: server-release.jar, Port 6567 and the Commands That MatterBlog7min
Recommended PC Tool
Recommended PC Tool
Outdated Drivers Are Slowing You DownFree scan - exact matches
PC Slower Than It Used to Be?Free scan - under a minute

Two free Windows tools

One Free Minute Could Fix That PC

Before you go - each of these free tools takes about a minute and tackles what quietly slows a Windows PC down.

Special offer. View Outbyte info, uninstall instructions, EULA, and Privacy Policy.