The talk presented at MySQL & Friends devroom at FOSDEM 2016 in Brussels: https://fosdem.org/2016/schedule/event/clusternaut/
Devroom: https://fosdem.org/2016/schedule/track/mysql_and_friends/
10. The Fit
➔ Layered
◆ Client - Server
◆ Multi-layered
➔ Scaling
◆ Horizontal and Vertical
● Preferred?
➔ Statelessness in databases
◆ Planes of logic: Control/Data
➔ Elasticity
◆ Elastic Scalability
11. Declarative vs Imperative
➔ Configurable mgmt
◆ Puppet, Nix, Terraform
➔ Microservices
◆ What runs on my laptop
● What runs on server
● Reproducibility
➔ 12-factor app
➔ Composability
➔ Immutable deployment artifact
12. Containers
● Wth is a container and why should I care
○ Operating system virtualization
● Isolation
○ Hierarchies of isolation - application, cgroups,
namespaces, seccomp…
● Unikernels and VMs
○ Role?
● Some - LXC, Docker*, Rocket*, runc, jails, solaris
zones, lmcty, systemd-nspawn
13. Galera - really short intro!
➔ MySQL and WSREP api
➔ Galera plugin
➔ Group communication
➔ Synchronous replication
◆ ‘Virtually’
➔ EVS
➔ Certification-based
◆ Optimistic Concurrency
➔ Automatic Node Provisioning
14. Galera - really short intro!
➔ CAP theorem and Galera
◆ CP
➔ How does it fit
◆ Others
◆ Idempotency
➔ Stateless?
◆ Symmetric
◆ Replicas - Cassandra et.al.
◆ MySQL Cluster
➔ Maintenance of Quorum
15. Orchestration
● SOA def
○ ‘Stitching’
○ ‘Composing’
● Automation?
● Choreography
● Best of both worlds
16. Kubernetes
➔ Constituents:
◆ Kubelet
◆ Pods
● Main service & helpers
◆ Services
● The gcomm:// URL.
◆ Replication Controller
◆ Labels and Selectors
● MCollective
22. Services
● Don’t commingle with `microservices`
● Think of endpoints.
● Layering architecture
○ Logical address of subset of pods
● Communication
○ Environment
■ Ordering requirement
■ Discovery
○ DNS
■ Issues with DNS
23. Replication Controller
● “Herd Management”
● ASG
● Pod template
○ Pattern
○ Anti-pattern
● Role
○ Init for cluster
○ Rolling updates
○ Multi-version
24. Networking
● Docker-style linking
● Proxy for Pods
● Types
○ Pod to Pod
○ Pod to Service
○ Intra-Pod
○ External to Service
● Providers:
○ OpenVSwitch / Flannel / Calico / Weave / Google
27. Deployment
● Declare and build individual Galera/PXC nodes.
○ Keep it minimal and simple
○ No assumptions
● Without Kubernetes
○ Docker-compose
■ Possible issues
● Galera node ⇔ Pod
○ Haproxy
○ xinetd
28. Deployment
● Basic Steps:
○ Create a ‘flat’ network - 10.0.0.0/24
○ Create a ‘cluster’ - zone
○ Create a service endpoint.
■ Internal service - 3306/4567/4568.
■ External service - 3306/3306(?).
■ Expose the external.
■ Session affinities.
29. Deployment
● Next:
○ Bootstrap a node Pod from a template.
■ Query existing with selector.
○ Start rest of nodes from template.
■ Point to Service with selector.
■ Replication controller
○ Volumes
30. Deployment - Implications
● Load balancing in state transfers
● Respawning of nodes on timeout
○ May not be same nodes.
● kubectl to manage
● Separation of client and cluster traffic