Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.

Galera with Docker: How Synchronous Replication and Linux Containers mesh together

982 views

Published on

How Galera (Synchronous replication plugin for Percona XtraDB Cluster) can be used with Docker (or linux containers in general) to 'mesh' well.

Video of the talk: https://www.youtube.com/watch?v=3A8EF549Q3Y&list=PLctlsn9Gs8wbx47tuhxuNytdrsDf_LWI2&index=2

Playlist: http://www.youtube.com/playlist?list=PLctlsn9Gs8wbx47tuhxuNytdrsDf_LWI2

Published in: Engineering
  • Be the first to comment

  • Be the first to like this

Galera with Docker: How Synchronous Replication and Linux Containers mesh together

  1. 1. Galera with Docker How Synchronous Replication and Linux Containers mesh together Linux.conf.au 2015 Raghavendra Prabhu  raghavendra.d.prabhu@gmail.com Percona  raghavendra.prabhu@percona.com  randomsurfer  wnohang.net  rdprabhu  ronin13
  2. 2. Galera
  3. 3. Introduction Galera ▶ Data-centric approach ▶ EVS ▶ Causality and Synchronous ▶ Latency Raghavendra Prabhu (Percona) Galera with Docker 12 January, 2015 3 / 27
  4. 4. Containers!
  5. 5. Introduction Containers ▶ Linux namespaces ♦ PID ♦ Network ♦ Mount ♦ User ▶ Cgroups ♦ Metrics ♦ Good fences make good neighbors! Raghavendra Prabhu (Percona) Galera with Docker 12 January, 2015 5 / 27
  6. 6. Introduction Containers ▶ Manipulation ♦ nsenter/setns ♦ unshare ♦ clone ▶ CRIU - Migration and High Availability Raghavendra Prabhu (Percona) Galera with Docker 12 January, 2015 6 / 27
  7. 7. The uptime whale!
  8. 8. Introduction Docker ▶ Layers ▶ Volumes ▶ Storage ♦ Btrfs ♦ Device mapper ♦ Union mounts - OverlayFS ▶ Dockerfile and determinism ▶ Simplified networking ♦ Batteries included! Raghavendra Prabhu (Percona) Galera with Docker 12 January, 2015 8 / 27
  9. 9. Symmetry in replication and deployment
  10. 10. Introduction Together ▶ Elastic requirements ▶ Fast scalability ▶ Packing for saturation ♦ Strategies/Filters/Metadata ♦ KSM ▶ Snapshot Transfer and COW ▶ Runtime instantiation Raghavendra Prabhu (Percona) Galera with Docker 12 January, 2015 10 / 27
  11. 11. Introduction Together :: Images ▶ Build and start ♦ Minimal ♦ Inheritance ♦ Extensibility ♦ Immutability ♦ Registry: go get! ▶ Minimal Assumptions ▶ Galera images ♦ http://github.com/percona/pxc-docker ♦ https://hub.docker.com/u/ronin/ Raghavendra Prabhu (Percona) Galera with Docker 12 January, 2015 11 / 27
  12. 12. Introduction Together :: Networking ▶ Linking ▶ Dnsmasq ▶ Weave ▶ libswarm ▶ OVS ▶ Andromeda Raghavendra Prabhu (Percona) Galera with Docker 12 January, 2015 12 / 27
  13. 13. Introduction Together :: Networking :: Issues ▶ IP address and restart ▶ dhcpcd ▶ Socket interface ▶ Linking ♦ Patterns ▶ Kernel ABI Raghavendra Prabhu (Percona) Galera with Docker 12 January, 2015 13 / 27
  14. 14. Introduction Together :: Use cases ▶ Testing - https://github.com/percona/pxc-docker/tree/master/chaos- galera ▶ Benchmarking ▶ Production Deployment ▶ Rolling Upgrades ▶ Rapid Development ♦ https://github.com/percona/pxc-docker/tree/master/ docker-bld Raghavendra Prabhu (Percona) Galera with Docker 12 January, 2015 14 / 27
  15. 15. Introduction Together :: Patterns ▶ Systemd and Docker ▶ Packaging testing ▶ Management of process ♦ Supervisor pattern Raghavendra Prabhu (Percona) Galera with Docker 12 January, 2015 15 / 27
  16. 16. Orchestration
  17. 17. Introduction Orchestration ▶ Fig && Docker Compose ♦ Limitations ▶ Mesos and Docker swarm ▶ Flannel and Kubernates Raghavendra Prabhu (Percona) Galera with Docker 12 January, 2015 17 / 27
  18. 18. Container deployment
  19. 19. Introduction Deployment ▶ Amazon EC2 ▶ Google Container Engine ▶ Azure ▶ DigitalOcean ▶ Joyent SmartCloud ▶ Virtual Machines Raghavendra Prabhu (Percona) Galera with Docker 12 January, 2015 19 / 27
  20. 20. Who contains the containers?
  21. 21. Introduction Environment ▶ Project Atomic: rpm-ostree ▶ Snappy ▶ CoreOS ▶ Apache Mesos ▶ Docker swarm Raghavendra Prabhu (Percona) Galera with Docker 12 January, 2015 21 / 27
  22. 22. Introduction Environment :: CoreOS ▶ Systemd integration ▶ etcd - Raft ▶ fleet ▶ Bootstrapping and voting ♦ Queues ♦ Test and Set ♦ TTL and Watch ♦ Sidekicks Raghavendra Prabhu (Percona) Galera with Docker 12 January, 2015 22 / 27
  23. 23. Introduction Others ▶ lxc/lxd ▶ systemd-nspawn ▶ Rocket ♦ App Container Specification Raghavendra Prabhu (Percona) Galera with Docker 12 January, 2015 23 / 27
  24. 24. What you see is what you get to attack
  25. 25. Introduction Security ▶ sVirt ▶ seccomp ▶ Visibility: Namespaces ▶ Capabilities / Privileged ▶ Verifiability upto bare-metal ▶ Remote images Raghavendra Prabhu (Percona) Galera with Docker 12 January, 2015 25 / 27
  26. 26. Introduction About ▶ /me: Raghavendra Prabhu, Product Lead, Percona XtraDB Cluster, Percona. ▶ Slides will be at slideshare.net/slidunder. ▶ About.me: raghavendra.prabhu ▶ Keybase.io: rdprabhu ▶ Presentation under CC BY-SA 4.0 Raghavendra Prabhu (Percona) Galera with Docker 12 January, 2015 26 / 27
  27. 27. Introduction Image Credits ▶ https://commons.wikimedia.org/wiki/File: Venice_galley,_rowing_alla_sensile2.jpg ▶ https://commons.wikimedia.org/wiki/File:ShippingContainerSFBay.jpg ▶ https://www.flickr.com/photos/stephanie_in_love/5412368995/ ▶ http://en.wikipedia.org/wiki/Orchestra ▶ https://www.google.com/hostednews/getty/article/ALeqM5ht_B847adBMPN2_ 8ivClssq937Eg?docId=164893212 ▶ http://pixabay.com/en/container-port-hamburg-49538/ ▶ https://i.ytimg.com/vi/Q5POuMHxW-0/maxresdefault.jpg ▶ https://upload.wikimedia.org/wikipedia/commons/e/e6/Order-3_heptakis_ heptagonal_tiling.png Raghavendra Prabhu (Percona) Galera with Docker 12 January, 2015 27 / 27

×