-
Notifications
You must be signed in to change notification settings - Fork 6
/
notes.txt
132 lines (116 loc) · 2.94 KB
/
notes.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
# Elephants on Automatc
Introduction: It's time for State
- we've automated and scaled the stateless applications
- now we have statefulset
- time to automate stateful apps
- still some work to be done
Bot Pattern
- scheduler problems
- too much application-specific logic
- telephone lag
- instead, add code to control stateful nodes
from within
- maintains
initialization
group members
failover
monitoring
- mention ContainerPilot?
Helm
- deploy app with lots of parameters
- coordinate multi-container application with dependencies
- really just parameterized kubernetes files with registry
Oleksii
Patroni
- RAFT is the fabric that holds together your PostgreSQL containers
- External consistent key-value store instead of a built-in one:
advantages:
- PostgreSQL failure doesn't break the consensus
- use well-tested RAFT implementations (i.e. Etcd or Consul)
disadvantages:
- one needs to operate extra services
Features:
- synchronous vs asynchronous replication (consistency vs availability)
- some parameters need to be kept in sync on all cluster nodes (max_connections)
CitusDB
- sharded postgres
- query node, plus shard nodes
- shards with duplication
- automatically distribute queries
giant robot elephant from The Nantes Project
elephant helm by Blank Williams
robot elephant by Robert Chew
robot with elephant by Mark F Stosiak
stubborn elephant by Kolja Wilcke @01k
A long strange journey
- yak-shaving
- wanted to automate HA postgres
- containers solved a number of issues
- statefulness gulf
- building the foundation
- got involved with PetSet
Containerize Vs. Not?
- TL;DR: this is an "in 6 months" solution
- why to containerize
- easy installation
- encapsulation of service
- force good DBA habits
- orchestration
- easy testing
- benefits of orchestration
- manage multiple Postgres instances
- auto-vivification
- managing connections and pools
- HA/DR
- integrate with rest of stack
- self-service for developers
- use GCE
- drawbacks
- alphas
- waiting for fixes, features
- extra setup (unless you use GCE)
- new ways of admin/config/monitoring
The Prototypes
- why they're only prototypes
- containers
- autopilot pattern
- container considerations
- log to stdout/err
- install bootstrap & pvs
- required parts:
- config
- hba
- initial users & pwds
- patroni container
- guided tour
- citusdb
- guided tour
- kubernetes config
- explanation of statefulset parts
- patroni
- etcd requirement
- demo of deployment
- PV vs. emphemeral
- citusdb
- demo of deployment
- using citusdb
Productionizing
- list of needed items:
- PVs
- Vault
- sidecar containers
- backup
- pooling
- etcd
- db management
- pgadmin
- features on the waitlist
- union configmap
- Vault plugin
- federated StatefulSets
- issues with PVs
- affinity
- more containerizing
- Postgres Pro MM-Sync
- BDR?
Q?