[role="xpack"]
[[uptime-deployment-arch]]
== Deployment Architecture

There are multiple ways to deploy Uptime and Heartbeat. 
Use the information in this section to determine the best deployment for you. 
A guiding principle is that when an outage takes down the service being monitored it should not also take down Heartbeat.
You want Heartbeat to be functioning even when your service is not, so the guidelines here help you maximize this possibility.

Heartbeat is commonly run as a centralized service within a data center.
While it is possible to run it as a separate "sidecar" process paired with each process/container, we recommend against it.
Running Heartbeat centrally ensures you will still be able to see monitoring data in the event of an overloaded, disconnected, or otherwise malfunctioning server. 

For further redundancy, you may want to deploy multiple Heartbeats across geographic and network boundaries to provide more data.
To do so, specify Heartbeat's observer {heartbeat-ref}/configuration-observer-options.html[geo options]. 

Some examples might be:

* **A site served from a content delivery network (CDN) with points of presence (POPs) around the globe:**
To check if your site is reachable via CDN POPS, you may want to have multiple Heartbeat instances at different data centers around the world.
* **A service within a single data center that is accessed across multiple VPNs:** 
Set up one Heartbeat instance within the VPN the service operates from, and another within an additional VPN that users access the service from. 
Having both instances helps pinpoint network errors in the event of an outage.
* **A single service running primarily in a US east coast data center, with a hot failover located in a US west coast data center:**
In each data center, run a Heartbeat instance that checks both the local copy of the service and its counterpart across the country.
Set up two monitors in each region, one for the local service and one for the remote service.
In the event of a data center failure it will be immediately apparent if the service had a connectivity issue to the outside world or if the failure was only internal.
