-
Notifications
You must be signed in to change notification settings - Fork 365
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #19 from zalando/feature/sizing-advice
Wrote some chapters for sizing information and scaling up/down.
- Loading branch information
Showing
3 changed files
with
69 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
# Scaling up or down | ||
|
||
At some point during the lifetime of Spilo you may decide that you may need to scale up, scale down or change other | ||
parts of the infrastructure. | ||
|
||
The following plan will accomplish this: | ||
|
||
1. Change the CloudFormation template to reflect the changes in infrastructure | ||
2. Increase the number of EC2 instances in your AutoScalingGroup (or: Terminate one of the streaming replica's) | ||
3. Kill one of the replica's running on the old configuration | ||
4. Repeat step 2 and 3 until all replica's are running the new configuration | ||
5. Fail over the Spilo cluster | ||
6. Terminate the replica (the previous master) | ||
|
||
Only during the fail over will there be some downtime for the master instance. | ||
|
||
If your databases' size is significant, these steps may take some time to complete. Optimizations of this process | ||
(think of using EBS snapshots) are on the roadmap but not yet available. | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
# Sizing your Spilo | ||
|
||
As every use case of a database is unique we cannot simply advise you to use a certain instance type for Spilo. | ||
To get some notion of what is available, look at the Amazon resources: | ||
|
||
* [Amazon EC2 Instances](https://aws.amazon.com/ec2/instance-types/) | ||
|
||
# Guidelines | ||
We can however provide some guidelines in choosing your instance types. | ||
Choosing an instances type has some basic parameters: | ||
|
||
- database size | ||
- database usage pattern | ||
- performance requirements | ||
- usage characteristics | ||
- costs | ||
|
||
## Costs | ||
To have some notion of the costs of Spilo, we have calculated the costs for some possible configurations. | ||
|
||
**Note**: These are costs for an individual instance, as a case study. All prerequisites (Senza, Etcd) are considered | ||
to be available and are not part of the costs of Spilo. | ||
These figures are meant to show the approximate costs, they *will* vary depending on your usecase and resource usage. | ||
|
||
The following table shows ballpark figures of the raw costs of a single node of Spilo, as well as the Spilo costs when | ||
using the default configuration of 3 members in the AutoScalingGroup. | ||
The pricing information is taken from Amazon, and are for On-Demand pricing (August 2015): | ||
|
||
* [Amazon EC2 Pricing](https://aws.amazon.com/ec2/pricing/) | ||
* [Amazon EBS Pricing](https://aws.amazon.com/ebs/pricing/) | ||
|
||
| EC2 | Storage | Monthly ($) | Spilo ($) | | ||
|----------|---------------------------:|---------:|-------: | ||
| t2.micro | 10 GB EBS | 11 | 33 | | ||
| m4.large | 100 GB EBS | 111 | 333 | | ||
| r3.2xlarge | (provisioned) 500 GB EBS | 664 | 1992 | | ||
| d2.8xlarge | (RAID 10) 24 TB HDD | 4292 | 12876 | | ||
|
||
## Database usage | ||
For some types of databases the smallest possible instance available can be a good candidate. Some examples that | ||
can probably run fine on t2.micro instances are: | ||
|
||
* Very small (< 500 MB) databases | ||
* Databases which are not queried often or heavily (some configuration store, an application registry) | ||
* Proof of Concepts / Prototyping | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters