Базы данных и Kubernetes

93aef1d166a8a3536538eff713f80307?s=47 flant
December 04, 2018

Базы данных и Kubernetes

Доклад технического директора компании «Флант» (http://flant.ru/) Дмитрия Столярова на конференции Highload++ 2018 в Москве.

* Текстовый обзор доклада: https://habr.com/company/flant/blog/431500/
* Видео с выступления: https://youtu.be/BnegHj53pW4

93aef1d166a8a3536538eff713f80307?s=128

flant

December 04, 2018
Tweet

Transcript

  1. Дмитрий Столяров Базы данных и Kubernetes CTO & Co-founder v4

  2. А можно базу в Kubernetes? ? ? ? ? ?

    ?
  3. А можно базу в Kubernetes? ? ? ? ? ?

    ? В целом да, но... !
  4. ? ? ? ? ? ? В целом да, но...

    ! А можно базу в Kubernetes?
  5. ? ? ? ? ? ? В целом да, но...

    ! А можно базу в Kubernetes? stateful
  6. ? ? ? ? ? ? А можно базу в

    Kubernetes? stateful Зачем он нам в Kubernetes?
  7. ? ? ? ? ? ? А можно базу в

    Kubernetes? stateful Зачем он нам в Kubernetes? О каком stateful идет речь?
  8. О каком stateful идет речь? Relational Database NoSQL Database

  9. О каком stateful идет речь? Relational Database NoSQL Database In-memory

    Database
  10. О каком stateful идет речь? Relational Database NoSQL Database In-memory

    Database Message Queue
  11. О каком stateful идет речь? Search Engine Relational Database NoSQL

    Database In-memory Database Message Queue
  12. О каком stateful идет речь? Search Engine Object Storage Relational

    Database NoSQL Database In-memory Database Message Queue
  13. О каком stateful идет речь? Search Engine Object Storage Relational

    Database NoSQL Database In-memory Database Message Queue Configuration & Service Discovery
  14. О каком stateful идет речь? ... Search Engine Object Storage

    Relational Database NoSQL Database In-memory Database Message Queue Configuration & Service Discovery
  15. Философия высокой доступности в Kubernetes Хранение данных и Kubernetes Гарантии

    согласованности в Kubernetes
  16. #1 Философия высокой доступности в Kubernetes

  17. cattle pets

  18. None
  19. None
  20. None
  21. RAID RAID

  22. RAID MySQL RAID MySQL

  23. RAID MySQL RAID MySQL

  24. RAID MySQL keepalived RAID MySQL keepalived

  25. RAID MySQL keepalived IP RAID MySQL keepalived IP

  26. RAID MySQL keepalived IP RAID MySQL keepalived IP

  27. RAID MySQL keepalived IP RAID MySQL keepalived IP

  28. RAID MySQL keepalived IP RAID MySQL keepalived IP

  29. RAID MySQL keepalived IP RAID MySQL keepalived IP

  30. RAID MySQL keepalived IP RAID MySQL keepalived IP

  31. RAID MySQL keepalived IP RAID MySQL keepalived IP

  32. RAID MySQL keepalived IP RAID MySQL keepalived IP

  33. RAID MySQL keepalived IP RAID MySQL keepalived IP

  34. RAID MySQL keepalived IP RAID MySQL keepalived IP

  35. RAID MySQL keepalived IP RAID MySQL keepalived IP

  36. RAID MySQL keepalived IP RAID MySQL keepalived IP

  37. RAID MySQL keepalived IP RAID MySQL keepalived IP

  38. RAID MySQL keepalived IP RAID MySQL keepalived IP

  39. RAID MySQL keepalived IP RAID MySQL keepalived IP

  40. RAID MySQL keepalived IP RAID MySQL keepalived IP ...

  41. RAID MySQL keepalived IP RAID MySQL keepalived IP ...

  42. RAID MySQL keepalived IP RAID MySQL keepalived IP ...

  43. RAID MySQL keepalived IP RAID MySQL keepalived IP ...

  44. RAID MySQL keepalived IP RAID MySQL keepalived IP ...

  45. RAID MySQL keepalived IP RAID MySQL keepalived IP PHP PHP

    ... PHP
  46. RAID MySQL keepalived IP RAID MySQL keepalived IP PHP ...

    PHP PHP
  47. RAID MySQL keepalived IP RAID MySQL keepalived IP PHP PHP

    ... PHP
  48. RAID MySQL keepalived IP RAID MySQL keepalived IP PHP PHP

    ... PHP PHP
  49. RAID MySQL keepalived IP RAID MySQL keepalived IP Механизмы high

    availability PHP PHP ... PHP PHP
  50. RAID MySQL keepalived IP RAID MySQL keepalived IP Механизмы high

    availability Deployment и StatefulSet PHP PHP ... PHP PHP
  51. RAID MySQL keepalived IP RAID MySQL keepalived IP Механизмы high

    availability Deployment и StatefulSet PodAntiAffinity PHP PHP ... PHP PHP
  52. RAID MySQL keepalived IP RAID MySQL keepalived IP Deployment и

    StatefulSet PodAntiAffinity PodDisruptionBudgets Механизмы high availability PHP PHP ... PHP PHP
  53. RAID MySQL keepalived IP RAID MySQL keepalived IP Deployment и

    StatefulSet PodAntiAffinity PodDisruptionBudgets Механизмы high availability PHP PHP ... PHP PHP
  54. RAID MySQL keepalived IP RAID MySQL keepalived IP Deployment и

    StatefulSet PodAntiAffinity PodDisruptionBudgets Механизмы high availability PHP PHP ... PHP PHP
  55. RAID MySQL keepalived IP RAID MySQL keepalived IP Deployment и

    StatefulSet PodAntiAffinity PodDisruptionBudgets Механизмы high availability PHP PHP ... PHP
  56. RAID MySQL keepalived IP RAID MySQL keepalived IP Deployment и

    StatefulSet PodAntiAffinity PodDisruptionBudgets Механизмы high availability PHP PHP ... PHP PHP
  57. RAID MySQL keepalived IP RAID MySQL keepalived IP Deployment и

    StatefulSet PodAntiAffinity PodDisruptionBudgets Механизмы high availability PHP PHP ... PHP PHP
  58. RAID MySQL keepalived IP RAID MySQL keepalived IP PHP PHP

    ... PHP PHP
  59. Итог

  60. Есть мощный фундамент Итог

  61. Есть мощный фундамент Требуются другие подходы Итог

  62. Есть мощный фундамент Требуются другие подходы Для stateful важна надежность

    узлов Итог
  63. #2 Гарантии согласованности в Kubernetes

  64. DB IP DB IP keepalived keepalived Как оно было раньше?

  65. App App App App App DB IP DB IP App

    App App App App keepalived keepalived Как оно было раньше?
  66. App App App App App DB IP DB IP App

    App App App App Balancer Balancer keepalived keepalived Как оно было раньше?
  67. App App App App App DB IP DB IP App

    App App App App Balancer Balancer keepalived keepalived Как оно было раньше?
  68. App App App App App DB IP DB IP App

    App App App App Balancer Balancer keepalived keepalived Как оно было раньше?
  69. App App App App App DB IP DB IP App

    App App App App Balancer Balancer keepalived keepalived Как оно было раньше?
  70. App App App App App DB IP DB IP App

    App App App App Balancer Balancer keepalived keepalived Как оно было раньше?
  71. App App App App App DB IP DB IP App

    App App App App Balancer Balancer keepalived keepalived Как оно было раньше?
  72. App App App App App DB IP DB IP App

    App App App App Balancer Balancer keepalived keepalived IP Как оно было раньше?
  73. App App App App App DB IP DB IP App

    App App App App Balancer Balancer keepalived keepalived IP Как оно было раньше?
  74. App App App App App DB IP DB IP App

    App App App App Balancer Balancer keepalived keepalived Как оно было раньше?
  75. App App App App App DB IP DB IP App

    App App App App Balancer Balancer Как оно было раньше?
  76. App App App App App DB IP DB IP App

    App App App App Balancer Balancer corosync corosync corosync Как оно было раньше?
  77. App App App App App DB IP DB IP App

    App App App App Balancer Balancer corosync corosync corosync Как оно было раньше?
  78. App App App App App DB IP DB IP App

    App App App App Balancer Balancer corosync corosync corosync Как оно было раньше?
  79. App App App App App DB IP DB IP App

    App App App App Balancer Balancer corosync corosync corosync Как оно было раньше?
  80. App App App App App DB IP DB IP App

    App App App App Balancer Balancer corosync corosync corosync Как оно было раньше?
  81. App App App App App DB IP DB IP App

    App App App App Balancer Balancer corosync corosync corosync Как оно было раньше?
  82. App App App App App DB IP App App App

    App App Balancer Balancer corosync corosync DB IP corosync Как оно было раньше?
  83. App App App App App App App App App App

    Balancer Balancer DB IP corosync Как оно было раньше? DB IP corosync corosync
  84. App App App App App App App App App App

    Balancer Balancer DB IP corosync Как оно было раньше? DB IP corosync corosync 1
  85. App App App App App App App App App App

    Balancer Balancer DB IP corosync Как оно было раньше? DB IP corosync IP 2 corosync 2 1
  86. App App App App App App App App App App

    Balancer Balancer corosync DB IP corosync Как оно было раньше? DB IP corosync IP
  87. App App App App App App App App App App

    Balancer Balancer corosync DB IP corosync Как оно было раньше? DB IP corosync IP
  88. App App App App App App App App App App

    Balancer Balancer corosync DB IP corosync Как оно было раньше? DB IP corosync IP At-most-once guarantee
  89. А как там в Kubernetes?

  90. app-csm52 app-59ptg app-xfvr7 Deployment А как там в Kubernetes?

  91. app-csm52 app-59ptg app-xfvr7 db-0 db-1 Deployment StatefulSet А как там

    в Kubernetes?
  92. app-csm52 app-59ptg app-xfvr7 Deployment StatefulSet А как там в Kubernetes?

    db-0 db-1
  93. app-csm52 app-59ptg app-xfvr7 Deployment StatefulSet А как там в Kubernetes?

    db-0 db-1
  94. app-csm52 app-59ptg app-xfvr7 app-ck9cm Deployment StatefulSet А как там в

    Kubernetes? db-0 db-1
  95. app-csm52 app-59ptg app-xfvr7 app-ck9cm Deployment StatefulSet А как там в

    Kubernetes? At-most-once guarantee db-0 db-1
  96. app-59ptg app-xfvr7 app-ck9cm Deployment StatefulSet А как там в Kubernetes?

    db-1 app-csm52 db-0
  97. app-59ptg app-xfvr7 app-ck9cm Deployment StatefulSet А как там в Kubernetes?

    db-1 app-csm52 Может продолжить писать в базу! db-0
  98. app-csm52 app-59ptg app-xfvr7 app-ck9cm Deployment StatefulSet А как там в

    Kubernetes? At-most-once guarantee но также требуется fencing db-0 db-1
  99. app-csm52 app-59ptg app-xfvr7 app-ck9cm Deployment StatefulSet А как там в

    Kubernetes? At-most-once guarantee но так же требуется fencing db-0 db-1 Все еще требуется fencing!!
  100. app-csm52 app-59ptg app-xfvr7 app-ck9cm Deployment StatefulSet А как там в

    Kubernetes? At-most-once guarantee но так же требуется fencing db-0 db-1 Все еще требуется fencing!! ...или?
  101. Другой подход

  102. DB IP DB IP App App App App App App

    App App App App Balancer Balancer Другой подход
  103. DB IP DB IP App App App App App App

    App App App App Balancer Balancer Другой подход
  104. DB IP DB IP App App App App App App

    App App App App Balancer Balancer Другой подход LB
  105. DB IP DB IP App App App App App App

    App App App App Balancer Balancer Другой подход LB
  106. DB IP DB IP App App App App App App

    App App App App Balancer Balancer Другой подход LB
  107. DB IP DB IP App App App App App App

    App App App App Balancer Balancer Другой подход LB
  108. DB IP DB IP App App App App App App

    App App App App Balancer Balancer Другой подход LB
  109. DB IP DB IP App App App App App App

    App App App App Balancer Balancer Другой подход LB
  110. DB IP DB IP App App App App App App

    App App App App Balancer Balancer Другой подход LB “Consistent Switchover”
  111. DB IP DB IP App App App App App App

    App App App App Balancer Balancer Другой подход LB Но как сделать generic?
  112. DB IP DB IP App App App App App App

    App App App App Balancer Balancer Другой подход
  113. App App App App App DB IP DB IP App

    P App P App P App P App P Balancer Balancer Другой подход
  114. App App App App App DB IP DB IP App

    P App P App P App P App P Balancer Balancer Другой подход
  115. App App App App App DB IP DB IP App

    P App P App P App P App P Balancer Balancer Другой подход
  116. App App App App App DB IP DB IP App

    P App P App P App P App P Balancer Balancer Другой подход
  117. App App App App App DB IP DB IP App

    P App P App P App P App P Balancer Balancer Другой подход
  118. App App App App App DB IP DB IP App

    P App P App P App P App P Balancer Balancer Другой подход
  119. App App App App App DB IP DB IP App

    P App P App P App P App P Balancer Balancer Другой подход
  120. App App App App App DB IP DB IP App

    P App P App P App P App P Balancer Balancer Другой подход
  121. App App App App App DB IP DB IP App

    P App P App P App P App P Balancer Balancer Другой подход
  122. App App App App App DB IP DB IP App

    P App P App P App P App P Balancer Balancer Другой подход
  123. App App App App App DB IP DB IP App

    P App P App P App P App P Balancer Balancer Другой подход
  124. App App App App App DB IP DB IP App

    P App P App P App P App P Balancer Balancer Другой подход
  125. App App App App App DB IP DB IP App

    P App P App P App P App P Balancer Balancer “Consistent Switchover” Другой подход
  126. Итог

  127. Есть семантика at-most-once Итог

  128. Есть семантика at-most-once Нет fencing’а, хотя можно и сделать Итог

  129. Есть семантика at-most-once Нет fencing’а, хотя можно и сделать Очень

    не хватает Consistent Switchover Итог
  130. #3 Хранение данных и Kubernetes

  131. Network Block Device aka SAN ReadWriteOnce Kubernetes Access Mode:

  132. Network Block Device aka SAN ReadWriteOnce Kubernetes Access Mode: Public

    cloud: AzureDisk AWSElasticBlockStore GCEPersistentDisk
  133. Network Block Device aka SAN ReadWriteOnce Kubernetes Access Mode: Public

    cloud: AzureDisk AWSElasticBlockStore GCEPersistentDisk Private cloud: Cinder VsphereVolume
  134. Network Block Device aka SAN ReadWriteOnce Kubernetes Access Mode: Public

    cloud: AzureDisk AWSElasticBlockStore GCEPersistentDisk Private cloud: Cinder VsphereVolume Bare metal or private cloud: Ceph RBD Fibre Channel iSCSI
  135. Network Block Device db-0

  136. Network Block Device db-0

  137. Network Block Device db-0

  138. Network Block Device db-0

  139. Network Block Device db-0

  140. Network Block Device db-0

  141. Network Block Device

  142. Network Block Device db-0

  143. Network Block Device db-0

  144. Network Block Device db-0

  145. Network Block Device db-0

  146. Network Block Device db-0

  147. Network Block Device db-0

  148. Network Block Device db-0

  149. Network Block Device db-0

  150. Network Block Device db-0

  151. Network Block Device db-0

  152. IOPS & Latency

  153. IOPS & Latency NVMe MySQL 100µs

  154. IOPS & Latency NVMe MySQL RDMA NVMe MySQL 150µs 100µs

  155. IOPS & Latency NVMe MySQL RDMA NVMe MySQL Commodity iSCSI

    MySQL 100µs 1ms 150µs
  156. IOPS & Latency NVMe MySQL RDMA NVMe MySQL AWS EBS

    MySQL Commodity iSCSI MySQL 100µs 1ms 2-5ms 150µs
  157. IOPS & Latency NVMe MySQL RDMA NVMe MySQL AWS EBS

    MySQL Commodity iSCSI MySQL 100µs 1ms 2-5ms 150µs Performance Analysis of NVMe SSDs and their Implication on Real World Databases https://www.cs.utah.edu/~manua/pubs/systor15.pdf NVMe Performance Local vs. Remote https://www.samsung.com/us/labs/pdfs/2016-fms-forum-f-22-nvmf-local-remote-v05.pdf
  158. IOPS & Latency NVMe MySQL RDMA NVMe MySQL AWS EBS

    MySQL Commodity iSCSI MySQL Допустим, базе данных требуется ~50K IOPS 100µs 1ms 2-5ms 150µs Performance Analysis of NVMe SSDs and their Implication on Real World Databases https://www.cs.utah.edu/~manua/pubs/systor15.pdf NVMe Performance Local vs. Remote https://www.samsung.com/us/labs/pdfs/2016-fms-forum-f-22-nvmf-local-remote-v05.pdf
  159. IOPS & Latency NVMe MySQL 100µs 5 threads RDMA NVMe

    MySQL 150µs AWS EBS MySQL 2-5ms Commodity iSCSI MySQL 1ms Performance Analysis of NVMe SSDs and their Implication on Real World Databases https://www.cs.utah.edu/~manua/pubs/systor15.pdf NVMe Performance Local vs. Remote https://www.samsung.com/us/labs/pdfs/2016-fms-forum-f-22-nvmf-local-remote-v05.pdf Допустим, базе данных требуется ~50K IOPS
  160. IOPS & Latency Performance Analysis of NVMe SSDs and their

    Implication on Real World Databases https://www.cs.utah.edu/~manua/pubs/systor15.pdf NVMe Performance Local vs. Remote https://www.samsung.com/us/labs/pdfs/2016-fms-forum-f-22-nvmf-local-remote-v05.pdf NVMe MySQL 100µs 5 threads RDMA NVMe MySQL 150µs 7.5 threads AWS EBS MySQL 2-5ms Commodity iSCSI MySQL 1ms Допустим, базе данных требуется ~50K IOPS
  161. IOPS & Latency Performance Analysis of NVMe SSDs and their

    Implication on Real World Databases https://www.cs.utah.edu/~manua/pubs/systor15.pdf NVMe Performance Local vs. Remote https://www.samsung.com/us/labs/pdfs/2016-fms-forum-f-22-nvmf-local-remote-v05.pdf NVMe MySQL 100µs 5 threads RDMA NVMe MySQL 150µs 7.5 threads AWS EBS MySQL 2-5ms Commodity iSCSI MySQL 1ms 50 threads Допустим, базе данных требуется ~50K IOPS
  162. IOPS & Latency Performance Analysis of NVMe SSDs and their

    Implication on Real World Databases https://www.cs.utah.edu/~manua/pubs/systor15.pdf NVMe Performance Local vs. Remote https://www.samsung.com/us/labs/pdfs/2016-fms-forum-f-22-nvmf-local-remote-v05.pdf NVMe MySQL 100µs 5 threads RDMA NVMe MySQL 150µs 7.5 threads AWS EBS MySQL 2-5ms 100-250 threads Commodity iSCSI MySQL 1ms 50 threads Допустим, базе данных требуется ~50K IOPS
  163. Network Block Device aka SAN ReadWriteOnce Kubernetes Access Mode: Public

    cloud: AzureDisk AWSElasticBlockStore GCEPersistentDisk Private cloud: Cinder VsphereVolume Bare metal or private cloud: Ceph RBD Fibre Channel iSCSI Local Storage ReadWriteOnce Kubernetes Access Mode: Это просто локальный диск: SATA / SAS / SSD / NVME
  164. db-0 Local storage

  165. db-0 Local storage

  166. db-0 Local storage

  167. db-0 Local storage

  168. Network Block Device aka SAN ReadWriteOnce Kubernetes Access Mode: Public

    cloud: AzureDisk AWSElasticBlockStore GCEPersistentDisk Private cloud: Cinder VsphereVolume Bare metal or private cloud: Ceph RBD Fibre Channel iSCSI Local Storage ReadWriteOnce Kubernetes Access Mode: Это просто локальный диск: SATA / SAS / SSD / NVME
  169. Network Block Device aka SAN ReadWriteOnce Kubernetes Access Mode: Public

    cloud: AzureDisk AWSElasticBlockStore GCEPersistentDisk Private cloud: Cinder VsphereVolume Bare metal or private cloud: Ceph RBD Fibre Channel iSCSI Local Storage ReadWriteOnce Kubernetes Access Mode: Это просто локальный диск: SATA / SAS / SSD / NVME
  170. ReadWriteOnce db-0

  171. ReadWriteOnce db-0 db-1

  172. ReadWriteOnce db-0 db-1

  173. ReadWriteOnce db-0 db-1

  174. ReadWriteOnce db-0 db-1 pv-1 pv-0

  175. ReadWriteOnce и Stateful Set db-0 pv-1 pv-0 db-1

  176. ReadWriteOnce и Stateful Set db-0 db-1 pv-1 pv-0

  177. ReadWriteOnce и Stateful Set db-0 db-1 db-2 pv-1 pv-0 pv-2

  178. Network Block Device Network File System aka SAN aka NAS

    ReadWriteOnce Kubernetes Access Mode: ReadWriteMany Kubernetes Access Mode: Public cloud: AzureDisk AWSElasticBlockStore GCEPersistentDisk Private cloud: Cinder VsphereVolume Bare metal or private cloud: Ceph RBD Fibre Channel iSCSI Local Storage ReadWriteOnce Kubernetes Access Mode: Это просто локальный диск: SATA / SAS / SSD / NVME
  179. Network Block Device Network File System aka SAN aka NAS

    ReadWriteOnce Kubernetes Access Mode: ReadWriteMany Kubernetes Access Mode: Public cloud: AzureDisk AWSElasticBlockStore GCEPersistentDisk Private cloud: Cinder VsphereVolume Bare metal or private cloud: Ceph RBD Fibre Channel iSCSI Public cloud: AzureFile AWSElasticFileSystem Local Storage ReadWriteOnce Kubernetes Access Mode: Это просто локальный диск: SATA / SAS / SSD / NVME
  180. Network Block Device Network File System aka SAN aka NAS

    ReadWriteOnce Kubernetes Access Mode: ReadWriteMany Kubernetes Access Mode: Public cloud: AzureDisk AWSElasticBlockStore GCEPersistentDisk Private cloud: Cinder VsphereVolume Bare metal or private cloud: Ceph RBD Fibre Channel iSCSI Public cloud: AzureFile AWSElasticFileSystem Bare metal or private cloud: CephFS Glusterfs NFS Local Storage ReadWriteOnce Kubernetes Access Mode: Это просто локальный диск: SATA / SAS / SSD / NVME
  181. Network File System PHP PHP PHP

  182. Network Block Device Network File System aka SAN aka NAS

    ReadWriteOnce Kubernetes Access Mode: ReadWriteMany Kubernetes Access Mode: Public cloud: AzureDisk AWSElasticBlockStore GCEPersistentDisk Private cloud: Cinder VsphereVolume Bare metal or private cloud: Ceph RBD Fibre Channel iSCSI Public cloud: AzureFile AWSElasticFileSystem Bare metal or private cloud: CephFS Glusterfs NFS Local Storage ReadWriteOnce Kubernetes Access Mode: Это просто локальный диск: SATA / SAS / SSD / NVME
  183. Итог

  184. Итог С ReadWriteOnce всё отлично!

  185. Итог С ReadWriteOnce всё отлично! Старайтесь избегать Network File System

  186. Всё, освоено!

  187. Философия высокой доступности Гарантии согласованности Хранение данных Практика!

  188. #1 Standalone

  189. postgres-0

  190. postgres-0

  191. postgres-0 mysql-0

  192. postgres-0 mysql-0

  193. postgres-0 mysql-0

  194. postgres-0 mysql-0

  195. mysql-0 StatefulSet

  196. mysql-0 mysql StatefulSet

  197. app mysql-0 mysql StatefulSet

  198. #2 Реплицированная пара с ручным переключением

  199. mysql-a-0 StatefulSet

  200. mysql-a-0 mysql-a StatefulSet

  201. mysql-b-0 StatefulSet mysql-a-0 mysql-a StatefulSet

  202. mysql-b-0 StatefulSet mysql-a-0 mysql-a StatefulSet репликация

  203. mysql-b-0 mysql-b StatefulSet mysql-a-0 mysql-a StatefulSet репликация

  204. mysql-b-0 mysql-b StatefulSet mysql-a-0 mysql-a StatefulSet mysql репликация

  205. mysql-b-0 mysql-b StatefulSet mysql-a-0 mysql-a StatefulSet mysql репликация

  206. app mysql-b-0 mysql-b StatefulSet mysql-a-0 mysql-a StatefulSet mysql репликация

  207. app mysql-b-0 mysql-b StatefulSet mysql-a-0 mysql-a StatefulSet mysql репликация

  208. app mysql-b-0 mysql-b StatefulSet mysql-a-0 mysql-a StatefulSet mysql репликация

  209. app mysql-b-0 mysql-b StatefulSet mysql-a-0 mysql-a StatefulSet mysql репликация

  210. app mysql-b-0 mysql-b StatefulSet mysql-a-0 mysql-a StatefulSet mysql репликация

  211. app mysql-b-0 mysql-b StatefulSet mysql-a-0 mysql-a StatefulSet mysql репликация

  212. app mysql-b-0 mysql-b StatefulSet mysql-a-0 mysql-a StatefulSet mysql репликация

  213. #3 Масштабирование нагрузки на чтение

  214. MySQL

  215. MySQL mysql-ro-0 StatefulSet mysql-ro-1 mysql-ro-2 ... репликация

  216. MySQL mysql-ro-0 StatefulSet mysql-ro-1 mysql-ro-2 ... репликация mysql-ro

  217. MySQL mysql-ro-0 StatefulSet mysql-ro-1 mysql-ro-2 ... репликация mysql-ro app read

  218. MySQL mysql-ro-0 StatefulSet mysql-ro-1 mysql-ro-2 ... репликация mysql-ro app write

    read
  219. #4 Умный клиент

  220. mc-0 StatefulSet mc-1 mc-2

  221. mc-0 StatefulSet memcached mc-1 mc-2

  222. mc-1 mc-0 StatefulSet memcached mc-2 mc-0.memcached mc-1.memcached mc-2.memcached

  223. mc-1 mc-0 StatefulSet memcached app mc-2 mc-0.memcached mc-1.memcached mc-2.memcached репликация

    шардинг
  224. mc-1 mc-0 StatefulSet memcached app mc-2 mc-0.memcached mc-1.memcached mc-2.memcached репликация

    шардинг
  225. mc-1 mc-0 StatefulSet memcached app mc-2 mc-0.memcached mc-1.memcached mc-2.memcached репликация

    шардинг
  226. #5 Cloud Native-решения

  227. None
  228. Умеют сами Failover Recovery Consistency

  229. db-1 db-0 StatefulSet db-2

  230. 1. Как узлы узнают друг о друге?

  231. 1. Как узлы узнают друг о друге? Kubernetes API

  232. 1. Как узлы узнают друг о друге? Kubernetes API DNS

    (несколько A-записей)
  233. 1. Как узлы узнают друг о друге? Kubernetes API DNS

    (несколько A-записей) Статически
  234. 1. Как узлы узнают друг о друге? Kubernetes API DNS

    (несколько A-записей) Статически Seed-узлы
  235. 1. Как узлы узнают друг о друге? Kubernetes API DNS

    (несколько A-записей) Статически Seed-узлы Сторонний Service Discovery
  236. 2. Как подключается клиент?

  237. rabbitmq-1 rabbitmq-0 StatefulSet rabbitmq-2 app rabbitmq 2. Как подключается клиент?

  238. app mg-1 mg-0 StatefulSet mongo mg-2 mc-0.mongo mc-1.mongo mc-2.mongo 2.

    Как подключается клиент?
  239. 3. Горизонтальное масштабирование?

  240. minio-1 minio-0 StatefulSet minio-2 3. Горизонтальное масштабирование? Нет

  241. minio-1 minio-0 StatefulSet minio-2 cassandra-1 cassandra-0 StatefulSet cassandra-2 ... 3.

    Горизонтальное масштабирование Нет Есть
  242. minio-1 minio-0 StatefulSet minio-2 cassandra-1 cassandra-0 StatefulSet cassandra-2 ... mongo-a-1

    mongo-a-0 StatefulSet mongo-a-2 mongo-a-1 mongo-a-0 StatefulSet mongo-a-2 ... 3. Горизонтальное масштабирование Нет Есть Есть #2
  243. None
  244. Отлично сочетаются с Kubernetes

  245. cattle pets Отлично сочетаются с Kubernetes

  246. cattle pets Отлично сочетаются с Kubernetes

  247. #6 Stolon PostgreSQL

  248. PostgreSQL cloud native High Availability

  249. cattle pets PostgreSQL cloud native High Availability

  250. cattle pets PostgreSQL cloud native High Availability

  251. etcd-0 StatefulSet etcd-1 etcd-2 etcd

  252. etcd-0 StatefulSet etcd-1 etcd-2 etcd keeper-0 StatefulSet keeper-1 keeper-2 postgresql

    postgresql postgresql
  253. etcd-0 StatefulSet etcd-1 etcd-2 etcd keeper-0 StatefulSet keeper-1 keeper-2 postgresql

    postgresql postgresql
  254. etcd-0 StatefulSet etcd-1 etcd-2 etcd sentinel Deployment sentinel keeper-0 StatefulSet

    keeper-1 keeper-2 postgresql postgresql postgresql
  255. etcd-0 StatefulSet etcd-1 etcd-2 etcd sentinel Deployment sentinel keeper-0 StatefulSet

    keeper-1 keeper-2 master postgresql postgresql postgresql
  256. etcd-0 StatefulSet etcd-1 etcd-2 etcd sentinel Deployment sentinel keeper-0 StatefulSet

    keeper-1 keeper-2 master standby standby postgresql postgresql postgresql
  257. etcd-0 StatefulSet etcd-1 etcd-2 etcd sentinel Deployment sentinel keeper-0 StatefulSet

    keeper-1 keeper-2 master standby standby postgresql postgresql postgresql
  258. etcd-0 StatefulSet etcd-1 etcd-2 etcd sentinel Deployment sentinel keeper-0 StatefulSet

    keeper-1 keeper-2 master standby standby postgresql postgresql postgresql репликация репликация
  259. etcd-0 StatefulSet etcd-1 etcd-2 etcd sentinel Deployment sentinel proxy Deployment

    proxy keeper-0 StatefulSet keeper-1 keeper-2 master standby standby postgresql postgresql postgresql репликация репликация
  260. etcd-0 StatefulSet etcd-1 etcd-2 etcd sentinel Deployment sentinel proxy Deployment

    proxy keeper-0 StatefulSet keeper-1 keeper-2 master standby standby postgresql postgresql postgresql репликация репликация Consistent Switchover
  261. etcd-0 StatefulSet etcd-1 etcd-2 etcd sentinel Deployment sentinel proxy Deployment

    proxy keeper-0 StatefulSet keeper-1 keeper-2 master standby standby postgresql postgresql postgresql репликация репликация Consistent Switchover
  262. etcd-0 StatefulSet etcd-1 etcd-2 etcd sentinel Deployment sentinel proxy Deployment

    proxy keeper-0 StatefulSet keeper-1 keeper-2 master standby standby postgresql postgresql postgresql репликация репликация Consistent Switchover
  263. etcd-0 StatefulSet etcd-1 etcd-2 etcd sentinel Deployment sentinel proxy Deployment

    proxy postgresql keeper-0 StatefulSet keeper-1 keeper-2 master standby standby postgresql postgresql postgresql репликация репликация Consistent Switchover
  264. app etcd-0 StatefulSet etcd-1 etcd-2 etcd sentinel Deployment sentinel proxy

    Deployment proxy postgresql keeper-0 StatefulSet keeper-1 keeper-2 master standby standby postgresql postgresql postgresql репликация репликация Consistent Switchover
  265. app etcd-0 StatefulSet etcd-1 etcd-2 etcd sentinel Deployment sentinel proxy

    Deployment proxy postgresql keeper-0 StatefulSet keeper-1 keeper-2 master standby standby postgresql postgresql postgresql репликация репликация Consistent Switchover cattle pets
  266. app etcd-0 StatefulSet etcd-1 etcd-2 etcd sentinel Deployment sentinel proxy

    Deployment proxy postgresql keeper-0 StatefulSet keeper-1 keeper-2 master standby standby postgresql postgresql postgresql репликация репликация Consistent Switchover
  267. None
  268. RAID MySQL keepalived IP RAID MySQL keepalived IP app etcd-0

    StatefulSet etcd-1 etcd-2 etcd sentinel Deployment sentinel proxy Deployment proxy postgresql kpr-0 StatefulSet kpr-1 kpr-2 master stndby stndby репликация репликация
  269. github.com/flant/grafana-statusmap grafana-statusmap Grafana panel plugin to visualize status of multiple

    objects over time. Звезданите нас, пожалуйста!
  270. github.com/flant/dapp dapp И тут тоже звезданите, плиз! 95% документации переведено

    на английский Перевод на GO готов на 60% Добавлена поддержка yaml и ansible Увеличена скорость работы с git и размер repo больше не влияет на потребление памяти Увеличена скорость работы с docker-registry и добавлена поддержка Google Container Registry Была придумана before-hook-creation hook delete policy, которая была впоследствии добавлена в helm
  271. Наши Docker/K8s-проекты github.com/flant/dapp github.com/flant/loghouse Дмитрий Столяров dmitry.stolyarov@flant.ru linkedin.com/in/distol github.com/distol Всем

    спасибо! Наш блог на Хабре habr.com/company/flant/ Наш YouTube-канал youtube.com/c/flant