Skip to content

Commit

Permalink
Added architecture overview on the VPC level.
Browse files Browse the repository at this point in the history
Documented some considerations.
  • Loading branch information
feikesteenbergen committed Apr 24, 2015
1 parent 2e877ab commit bf1697f
Showing 1 changed file with 48 additions and 3 deletions.
51 changes: 48 additions & 3 deletions docs/DESIGN.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,53 @@ Spilo was designed to be deployed on AWS.
Architecture: VPC
=================

VPC
+---------------------------------------------------------------+
| |
| etcd |
| O DNS Service Record (SRV) |
| +-----> O O +-------> _etcd+server._tcp.example.com |
| | O O<+ |
| | ^ | |
| | | | +-----+ |
| | +----------------> | |
| | +----------------------> DDS | |
| | | | +--------> | |
| | | | | +-----+ |
| +--------------+ +--------------+ |
| |-------v------| |--v-----------| |
| || || || || |
| ||HA Cluster 1|| ||HA Cluster 2|| |
| || || || || |
| |--------------| |--------------| |
| +--------------+ +--------------+ |
| |
+---------------------------------------------------------------+

Considerations
--------------
When considering what to build we had to determine which problems we want to solve or prevent.
The following points are important for us:

- automatic failover
- deploying a new HA-cluster can be done very quickly (< 15 minutes)
- human interaction for creating a HA-cluster is minimal
- sane defaults for a HA-cluster (security, configuration, backup)

High Available cluster (HA-cluster)
-----------------
A set of machines serving PostgreSQL databases. Its architecture is explained in more detail further on.

etcd
----
We were pointed towards etcd in combination with PostgreSQL by compose with their [governor](https://github.com/compose/governor). By using an external service which is specialized in solving the problem of distributed consencus we don't have to write our own. We will use one etcd per environment.

To find out more about etcd: [coreos.com/etcd](https://coreos.com/etcd/)

dds
---
A dynamic discovery service could be running which will gather information about the running HA-clusters. To find out which HA-clusters are running it will consult etcd.
The results of its discovery will also be stored in etcd, so other tools can easily use the discovered information.



Expand Down Expand Up @@ -51,10 +98,8 @@ Architecture: PostgreSQL High Available cluster



etcd
etcd proxy
====
We were pointed towards etcd in combination with PostgreSQL by compose with their [governor](https://github.com/compose/governor). By using an external service which is specialized in solving the problem of distributed consencus we don't have to write our own.

We assume a Higly Available etcd-cluster to be available for spilo when it is bootstrapped; we will use a etcd-proxy running on localhost to be a bridge between a HA-cluster member and the etcd-cluster.

HAProxy
Expand Down

0 comments on commit bf1697f

Please sign in to comment.