stackconf 2023 | Rolling Updates: Database Version Migrations with minimum Disruption by Anton Kovalenko

NETWAYS
NETWAYSNETWAYS
Rolling Updates: Database
Version Migrations with
minimum Disruption
Anton Kovalenko,
YDB TPM
2
1 2
Rolling
update
YDB Layered
Architecture
3 4
Rolling update:
YDB way
Availability
and Hardware
Failures
Agenda
3
YDB — Open-Source
Distributed SQL
Database
• Relational
ACID OLTP transactions
• Consistency
Strongly consistent
Serializable transaction isolation level
• Mission critical database
Works for projects with 24x7 requirements
• Highly available
Survives AZ plus rack failure w/o human
intervention, available for read/write
4
Users operate tables
to read and write data
• Tables have a primary key (PK)
• Tables are sorted by PK
• Tables could grow up
to petabytes of data
• Tables are automatically
partitioned
Row 1
Row 2
…
Row N
Column 1 Column 2 … Column N
Primary key
Partition 1
…
Partition N
Split point
7
Every software requires update
Single DB server
App1 App2
DB Cluster
App1 App2 App4
App3
DB Node DB Node 1 DB Node 2 DB Node 3
8
What is rolling update
App1 App2
Compute Node 2 Compute Node 3
App3
Compute Node 1
9
1 2 3
Minimize
error rate
Keep read
and write
availability
Minimize latency
degradation
Rolling update challenges are
10
YDB Architecture
application layer
User Application
Tablet
YDB SDK
Compute Layer
gRPC Proxies
Query Processor
Distributed Transactions
User tablets
Tablet
…
Tablet
System tablets
Tablet
…
Storage Layer
Distributed Storage
Internal cluster network
11
YDB SDK hides the complexity
Compute Node 1
App1 App2
Compute Node 2 Compute Node 3
App3
12
1 2 3
Compute
YDB SDK Distributed Storage
YDB Layers
13
YDB storage availability model
NVME
Storage server 1
NVME NVME NVME
Storage server 2
NVME NVME NVME
Storage server 3
NVME NVME
AZ1 AZ2 AZ3
14
YDB storage availability model
vdisk 1
AZ1
vdisk 2 vdisk 3 vdisk 4
AZ2
vdisk 5 vdisk 6 vdisk 7
AZ3
vdisk 8 vdisk 9
Compute Node 1
15
Compute node can
run on any cluster node
Storage Layer
BlobStorage Component
Internal cluster network
Compute
node 1
Compute
node 2
Compute
node 3
Compute
node 4
Compute
node 5
DbName = DB2
DbName = DB1
16
Compute node restart
causes transient errors
Compute
node 1
Compute
node 2
Compute
node 3
Compute
node 4
Compute
node 5
Compute
node 6
App1 App2 App3
AZ1 AZ2 AZ3
17
1 2 3
Minimize
error rate
Keep read
and write
availability
Minimize latency
degradation
Rolling update
is a challenging task
18
Restart storage nodes one by one
AZ1 AZ2 AZ3
Compute
node 100
Rolling restart tool
Storage server 1
Compute
node 101
Compute
node 102
Storage server 2
Compute
node 103
Compute
node 104
Storage server 3
Compute
node 105
19
YDB helps to restart storage
Rolling
restart
tool
4: list of nodes safe to restart
Storage restart constraints
• Keep read and right availability
• Restart as fast as possible
Large cluster restart is long
• 1 node restarts about 10s
• 1k node cluster restart 3h
YDB
Cluster
Management
System
3: request for restart
2: token + list of all nodes
1: restart storage nodes
20
CMS controls compute restarts
Rolling
restart
tool
Compute restart constraints
• Keep enough resources
• Restart as fast as possible
Restart multiple databases
• Databases are independent
• Different databases could be restarted
simultaneously
YDB
Cluster
Management
System
4: list of nodes safe to restart
3: request for restart
2: token + list of all nodes
1: restart compute nodes for some databases
21
CMS allows
to keep availability
Cluster Management System
• YDB Component
• Protects cluster
from unavailability
• Enables restart orchestration
22
Minimize user
operations disruption
Compute node 102
Tablet
Tablet
Tablet
App1
UNAVAILABLE
select name from product where id = 'ydb';
Compute node 101
Tablet
Tablet
Tablet
23
Minimize user operations
disruption
Compute
node 1
Compute
node 2
Compute
node 3
Compute
node 4
Compute
node 5
Compute
node 6
App1 App2 App3
AZ1 AZ2 AZ3
24
Compute node restart
causes errors
Unavailable
Bad session
25
Graceful tablets evacuation
Tablet
AZ1 AZ2 AZ3
Compute
Node 100
Tablet
Tablet
Tablet
Tablet
Compute
Node 101
Tablet
Tablet
Tablet
Rolling restart tool
Tablet
Compute
Node 102
Tablet
Tablet
Tablet
Tablet
Compute
Node 103
Tablet
Tablet
Tablet
Tablet
Compute
Node 104
Tablet
Tablet
Tablet
Tablet
Compute
Node 105
Tablet
Tablet
Tablet
SIGSTOP
26
Graceful session evacuation
Tablet
Tablet
Tablet
Tablet
Tablet
Compute
Node 101
Tablet
Tablet
Tablet
Tablet
Compute
Node 102
Tablet
Tablet
Tablet
Tablet
Compute
Node 103
Tablet
Tablet
Tablet
Tablet
Compute
Node 104
Tablet
Tablet
Tablet
Tablet
Compute
Node 105
Tablet
Tablet
Tablet
SIGSTOP
YDB App
x-ydb-server-hints: session-close
Rolling restart tool
AZ1 AZ2 AZ3
Compute
Node 100
27
• Cluster Management System
Tracks availability
Speeds-up restart
• Session and tablets evacuation
Reduces errors
YDB solves
challenges
28
• PostgreSQL wire and syntax
compatibility (C++)
To simplify migration of our users
we make PostgreSQL compatibility
• OLAP engine (C++)
We build OLAP engine
to improve analytical experience
• Column-organized tables (C++)
We make column-organized tables
to improve performance of analytical queries
• K8S deployment (Go)
We make our own k8s operator to make
it easyto deploy our database
in a cloud environment
Current
challenges
29
It’s easy
to try YDB
ydb.tech
• Managed service in Nebius Cloud
• On premise deployment options
Thank you!
Anton Kovalenko
kovalad@ydb.tech
Join our telegram chat t.me/ydb_en
1 von 28

Recomendados

Storage Spaces Direct - the new Microsoft SDS star - Carsten Rachfahl von
Storage Spaces Direct - the new Microsoft SDS star - Carsten RachfahlStorage Spaces Direct - the new Microsoft SDS star - Carsten Rachfahl
Storage Spaces Direct - the new Microsoft SDS star - Carsten RachfahlITCamp
2.5K views41 Folien
2010 12 mysql_clusteroverview von
2010 12 mysql_clusteroverview2010 12 mysql_clusteroverview
2010 12 mysql_clusteroverviewDimas Prasetyo
1.1K views36 Folien
Vijfhart thema-avond-oracle-12c-new-features von
Vijfhart thema-avond-oracle-12c-new-featuresVijfhart thema-avond-oracle-12c-new-features
Vijfhart thema-avond-oracle-12c-new-featuresmkorremans
558 views71 Folien
BigData Developers MeetUp von
BigData Developers MeetUpBigData Developers MeetUp
BigData Developers MeetUpChristian Johannsen
812 views52 Folien
Taking Splunk to the Next Level - Architecture Breakout Session von
Taking Splunk to the Next Level - Architecture Breakout SessionTaking Splunk to the Next Level - Architecture Breakout Session
Taking Splunk to the Next Level - Architecture Breakout SessionSplunk
5.1K views65 Folien
MYSQL von
MYSQLMYSQL
MYSQLgilashikwa
1.3K views26 Folien

Más contenido relacionado

Similar a stackconf 2023 | Rolling Updates: Database Version Migrations with minimum Disruption by Anton Kovalenko

iland Internet Solutions: Leveraging Cassandra for real-time multi-datacenter... von
iland Internet Solutions: Leveraging Cassandra for real-time multi-datacenter...iland Internet Solutions: Leveraging Cassandra for real-time multi-datacenter...
iland Internet Solutions: Leveraging Cassandra for real-time multi-datacenter...DataStax Academy
1.6K views63 Folien
Leveraging Cassandra for real-time multi-datacenter public cloud analytics von
Leveraging Cassandra for real-time multi-datacenter public cloud analyticsLeveraging Cassandra for real-time multi-datacenter public cloud analytics
Leveraging Cassandra for real-time multi-datacenter public cloud analyticsJulien Anguenot
2.3K views63 Folien
Reduced instruction set computers von
Reduced instruction set computersReduced instruction set computers
Reduced instruction set computersSyed Zaid Irshad
1K views38 Folien
RISC.ppt von
RISC.pptRISC.ppt
RISC.pptAmarDura2
3 views39 Folien
13 risc von
13 risc13 risc
13 riscAnwal Mirza
33 views39 Folien
Hadoop 3.0 - Revolution or evolution? von
Hadoop 3.0 - Revolution or evolution?Hadoop 3.0 - Revolution or evolution?
Hadoop 3.0 - Revolution or evolution?Uwe Printz
807 views42 Folien

Similar a stackconf 2023 | Rolling Updates: Database Version Migrations with minimum Disruption by Anton Kovalenko(20)

iland Internet Solutions: Leveraging Cassandra for real-time multi-datacenter... von DataStax Academy
iland Internet Solutions: Leveraging Cassandra for real-time multi-datacenter...iland Internet Solutions: Leveraging Cassandra for real-time multi-datacenter...
iland Internet Solutions: Leveraging Cassandra for real-time multi-datacenter...
DataStax Academy1.6K views
Leveraging Cassandra for real-time multi-datacenter public cloud analytics von Julien Anguenot
Leveraging Cassandra for real-time multi-datacenter public cloud analyticsLeveraging Cassandra for real-time multi-datacenter public cloud analytics
Leveraging Cassandra for real-time multi-datacenter public cloud analytics
Julien Anguenot2.3K views
Hadoop 3.0 - Revolution or evolution? von Uwe Printz
Hadoop 3.0 - Revolution or evolution?Hadoop 3.0 - Revolution or evolution?
Hadoop 3.0 - Revolution or evolution?
Uwe Printz807 views
Scylla Summit 2016: Outbrain Case Study - Lowering Latency While Doing 20X IO... von ScyllaDB
Scylla Summit 2016: Outbrain Case Study - Lowering Latency While Doing 20X IO...Scylla Summit 2016: Outbrain Case Study - Lowering Latency While Doing 20X IO...
Scylla Summit 2016: Outbrain Case Study - Lowering Latency While Doing 20X IO...
ScyllaDB3.4K views
Introducing Cloudian HyperStore 6.0 von Cloudian
Introducing Cloudian HyperStore 6.0Introducing Cloudian HyperStore 6.0
Introducing Cloudian HyperStore 6.0
Cloudian1.3K views
Red Hat Storage Day Seattle: Stabilizing Petabyte Ceph Cluster in OpenStack C... von Red_Hat_Storage
Red Hat Storage Day Seattle: Stabilizing Petabyte Ceph Cluster in OpenStack C...Red Hat Storage Day Seattle: Stabilizing Petabyte Ceph Cluster in OpenStack C...
Red Hat Storage Day Seattle: Stabilizing Petabyte Ceph Cluster in OpenStack C...
Red_Hat_Storage762 views
Oracle Performance On Linux X86 systems von Baruch Osoveskiy
Oracle  Performance On Linux  X86 systems Oracle  Performance On Linux  X86 systems
Oracle Performance On Linux X86 systems
Baruch Osoveskiy766 views
Resolving Firebird performance problems von Alexey Kovyazin
Resolving Firebird performance problemsResolving Firebird performance problems
Resolving Firebird performance problems
Alexey Kovyazin67.4K views
Teradata introduction - A basic introduction for Taradate system Architecture von Mohammad Tahoon
Teradata introduction - A basic introduction for Taradate system ArchitectureTeradata introduction - A basic introduction for Taradate system Architecture
Teradata introduction - A basic introduction for Taradate system Architecture
Mohammad Tahoon7.9K views
Journey to Stability: Petabyte Ceph Cluster in OpenStack Cloud von Patrick McGarry
Journey to Stability: Petabyte Ceph Cluster in OpenStack CloudJourney to Stability: Petabyte Ceph Cluster in OpenStack Cloud
Journey to Stability: Petabyte Ceph Cluster in OpenStack Cloud
Patrick McGarry2.5K views
Journey to Stability: Petabyte Ceph Cluster in OpenStack Cloud von Ceph Community
Journey to Stability: Petabyte Ceph Cluster in OpenStack CloudJourney to Stability: Petabyte Ceph Cluster in OpenStack Cloud
Journey to Stability: Petabyte Ceph Cluster in OpenStack Cloud
Ceph Community 158 views
Kubernetes at NU.nl (Kubernetes meetup 2019-09-05) von Tibo Beijen
Kubernetes at NU.nl   (Kubernetes meetup 2019-09-05)Kubernetes at NU.nl   (Kubernetes meetup 2019-09-05)
Kubernetes at NU.nl (Kubernetes meetup 2019-09-05)
Tibo Beijen148 views

Último

Organic Shopping in Google Analytics 4.pdf von
Organic Shopping in Google Analytics 4.pdfOrganic Shopping in Google Analytics 4.pdf
Organic Shopping in Google Analytics 4.pdfGA4 Tutorials
12 views13 Folien
VoxelNet von
VoxelNetVoxelNet
VoxelNettaeseon ryu
6 views21 Folien
Binder1.pdf von
Binder1.pdfBinder1.pdf
Binder1.pdfEstherSita2
10 views21 Folien
How Leaders See Data? (Level 1) von
How Leaders See Data? (Level 1)How Leaders See Data? (Level 1)
How Leaders See Data? (Level 1)Narendra Narendra
13 views76 Folien
RIO GRANDE SUPPLY COMPANY INC, JAYSON.docx von
RIO GRANDE SUPPLY COMPANY INC, JAYSON.docxRIO GRANDE SUPPLY COMPANY INC, JAYSON.docx
RIO GRANDE SUPPLY COMPANY INC, JAYSON.docxJaysonGarabilesEspej
6 views3 Folien
Survey on Factuality in LLM's.pptx von
Survey on Factuality in LLM's.pptxSurvey on Factuality in LLM's.pptx
Survey on Factuality in LLM's.pptxNeethaSherra1
5 views9 Folien

Último(20)

Organic Shopping in Google Analytics 4.pdf von GA4 Tutorials
Organic Shopping in Google Analytics 4.pdfOrganic Shopping in Google Analytics 4.pdf
Organic Shopping in Google Analytics 4.pdf
GA4 Tutorials12 views
Survey on Factuality in LLM's.pptx von NeethaSherra1
Survey on Factuality in LLM's.pptxSurvey on Factuality in LLM's.pptx
Survey on Factuality in LLM's.pptx
NeethaSherra15 views
[DSC Europe 23] Zsolt Feleki - Machine Translation should we trust it.pptx von DataScienceConferenc1
[DSC Europe 23] Zsolt Feleki - Machine Translation should we trust it.pptx[DSC Europe 23] Zsolt Feleki - Machine Translation should we trust it.pptx
[DSC Europe 23] Zsolt Feleki - Machine Translation should we trust it.pptx
Chapter 3b- Process Communication (1) (1)(1) (1).pptx von ayeshabaig2004
Chapter 3b- Process Communication (1) (1)(1) (1).pptxChapter 3b- Process Communication (1) (1)(1) (1).pptx
Chapter 3b- Process Communication (1) (1)(1) (1).pptx
ayeshabaig20045 views
CRM stick or twist workshop von info828217
CRM stick or twist workshopCRM stick or twist workshop
CRM stick or twist workshop
info8282178 views
CRIJ4385_Death Penalty_F23.pptx von yvettemm100
CRIJ4385_Death Penalty_F23.pptxCRIJ4385_Death Penalty_F23.pptx
CRIJ4385_Death Penalty_F23.pptx
yvettemm1006 views
[DSC Europe 23] Stefan Mrsic_Goran Savic - Evolving Technology Excellence.pptx von DataScienceConferenc1
[DSC Europe 23] Stefan Mrsic_Goran Savic - Evolving Technology Excellence.pptx[DSC Europe 23] Stefan Mrsic_Goran Savic - Evolving Technology Excellence.pptx
[DSC Europe 23] Stefan Mrsic_Goran Savic - Evolving Technology Excellence.pptx
[DSC Europe 23] Spela Poklukar & Tea Brasanac - Retrieval Augmented Generation von DataScienceConferenc1
[DSC Europe 23] Spela Poklukar & Tea Brasanac - Retrieval Augmented Generation[DSC Europe 23] Spela Poklukar & Tea Brasanac - Retrieval Augmented Generation
[DSC Europe 23] Spela Poklukar & Tea Brasanac - Retrieval Augmented Generation
Ukraine Infographic_22NOV2023_v2.pdf von AnastosiyaGurin
Ukraine Infographic_22NOV2023_v2.pdfUkraine Infographic_22NOV2023_v2.pdf
Ukraine Infographic_22NOV2023_v2.pdf
AnastosiyaGurin1.4K views
Short Story Assignment by Kelly Nguyen von kellynguyen01
Short Story Assignment by Kelly NguyenShort Story Assignment by Kelly Nguyen
Short Story Assignment by Kelly Nguyen
kellynguyen0119 views
UNEP FI CRS Climate Risk Results.pptx von pekka28
UNEP FI CRS Climate Risk Results.pptxUNEP FI CRS Climate Risk Results.pptx
UNEP FI CRS Climate Risk Results.pptx
pekka2811 views
[DSC Europe 23] Milos Grubjesic Empowering Business with Pepsico s Advanced M... von DataScienceConferenc1
[DSC Europe 23] Milos Grubjesic Empowering Business with Pepsico s Advanced M...[DSC Europe 23] Milos Grubjesic Empowering Business with Pepsico s Advanced M...
[DSC Europe 23] Milos Grubjesic Empowering Business with Pepsico s Advanced M...
SUPER STORE SQL PROJECT.pptx von khan888620
SUPER STORE SQL PROJECT.pptxSUPER STORE SQL PROJECT.pptx
SUPER STORE SQL PROJECT.pptx
khan88862012 views

stackconf 2023 | Rolling Updates: Database Version Migrations with minimum Disruption by Anton Kovalenko

  • 1. Rolling Updates: Database Version Migrations with minimum Disruption Anton Kovalenko, YDB TPM
  • 2. 2 1 2 Rolling update YDB Layered Architecture 3 4 Rolling update: YDB way Availability and Hardware Failures Agenda
  • 3. 3 YDB — Open-Source Distributed SQL Database • Relational ACID OLTP transactions • Consistency Strongly consistent Serializable transaction isolation level • Mission critical database Works for projects with 24x7 requirements • Highly available Survives AZ plus rack failure w/o human intervention, available for read/write
  • 4. 4 Users operate tables to read and write data • Tables have a primary key (PK) • Tables are sorted by PK • Tables could grow up to petabytes of data • Tables are automatically partitioned Row 1 Row 2 … Row N Column 1 Column 2 … Column N Primary key Partition 1 … Partition N Split point
  • 5. 7 Every software requires update Single DB server App1 App2 DB Cluster App1 App2 App4 App3 DB Node DB Node 1 DB Node 2 DB Node 3
  • 6. 8 What is rolling update App1 App2 Compute Node 2 Compute Node 3 App3 Compute Node 1
  • 7. 9 1 2 3 Minimize error rate Keep read and write availability Minimize latency degradation Rolling update challenges are
  • 8. 10 YDB Architecture application layer User Application Tablet YDB SDK Compute Layer gRPC Proxies Query Processor Distributed Transactions User tablets Tablet … Tablet System tablets Tablet … Storage Layer Distributed Storage Internal cluster network
  • 9. 11 YDB SDK hides the complexity Compute Node 1 App1 App2 Compute Node 2 Compute Node 3 App3
  • 10. 12 1 2 3 Compute YDB SDK Distributed Storage YDB Layers
  • 11. 13 YDB storage availability model NVME Storage server 1 NVME NVME NVME Storage server 2 NVME NVME NVME Storage server 3 NVME NVME AZ1 AZ2 AZ3
  • 12. 14 YDB storage availability model vdisk 1 AZ1 vdisk 2 vdisk 3 vdisk 4 AZ2 vdisk 5 vdisk 6 vdisk 7 AZ3 vdisk 8 vdisk 9 Compute Node 1
  • 13. 15 Compute node can run on any cluster node Storage Layer BlobStorage Component Internal cluster network Compute node 1 Compute node 2 Compute node 3 Compute node 4 Compute node 5 DbName = DB2 DbName = DB1
  • 14. 16 Compute node restart causes transient errors Compute node 1 Compute node 2 Compute node 3 Compute node 4 Compute node 5 Compute node 6 App1 App2 App3 AZ1 AZ2 AZ3
  • 15. 17 1 2 3 Minimize error rate Keep read and write availability Minimize latency degradation Rolling update is a challenging task
  • 16. 18 Restart storage nodes one by one AZ1 AZ2 AZ3 Compute node 100 Rolling restart tool Storage server 1 Compute node 101 Compute node 102 Storage server 2 Compute node 103 Compute node 104 Storage server 3 Compute node 105
  • 17. 19 YDB helps to restart storage Rolling restart tool 4: list of nodes safe to restart Storage restart constraints • Keep read and right availability • Restart as fast as possible Large cluster restart is long • 1 node restarts about 10s • 1k node cluster restart 3h YDB Cluster Management System 3: request for restart 2: token + list of all nodes 1: restart storage nodes
  • 18. 20 CMS controls compute restarts Rolling restart tool Compute restart constraints • Keep enough resources • Restart as fast as possible Restart multiple databases • Databases are independent • Different databases could be restarted simultaneously YDB Cluster Management System 4: list of nodes safe to restart 3: request for restart 2: token + list of all nodes 1: restart compute nodes for some databases
  • 19. 21 CMS allows to keep availability Cluster Management System • YDB Component • Protects cluster from unavailability • Enables restart orchestration
  • 20. 22 Minimize user operations disruption Compute node 102 Tablet Tablet Tablet App1 UNAVAILABLE select name from product where id = 'ydb'; Compute node 101 Tablet Tablet Tablet
  • 21. 23 Minimize user operations disruption Compute node 1 Compute node 2 Compute node 3 Compute node 4 Compute node 5 Compute node 6 App1 App2 App3 AZ1 AZ2 AZ3
  • 22. 24 Compute node restart causes errors Unavailable Bad session
  • 23. 25 Graceful tablets evacuation Tablet AZ1 AZ2 AZ3 Compute Node 100 Tablet Tablet Tablet Tablet Compute Node 101 Tablet Tablet Tablet Rolling restart tool Tablet Compute Node 102 Tablet Tablet Tablet Tablet Compute Node 103 Tablet Tablet Tablet Tablet Compute Node 104 Tablet Tablet Tablet Tablet Compute Node 105 Tablet Tablet Tablet SIGSTOP
  • 24. 26 Graceful session evacuation Tablet Tablet Tablet Tablet Tablet Compute Node 101 Tablet Tablet Tablet Tablet Compute Node 102 Tablet Tablet Tablet Tablet Compute Node 103 Tablet Tablet Tablet Tablet Compute Node 104 Tablet Tablet Tablet Tablet Compute Node 105 Tablet Tablet Tablet SIGSTOP YDB App x-ydb-server-hints: session-close Rolling restart tool AZ1 AZ2 AZ3 Compute Node 100
  • 25. 27 • Cluster Management System Tracks availability Speeds-up restart • Session and tablets evacuation Reduces errors YDB solves challenges
  • 26. 28 • PostgreSQL wire and syntax compatibility (C++) To simplify migration of our users we make PostgreSQL compatibility • OLAP engine (C++) We build OLAP engine to improve analytical experience • Column-organized tables (C++) We make column-organized tables to improve performance of analytical queries • K8S deployment (Go) We make our own k8s operator to make it easyto deploy our database in a cloud environment Current challenges
  • 27. 29 It’s easy to try YDB ydb.tech • Managed service in Nebius Cloud • On premise deployment options
  • 28. Thank you! Anton Kovalenko kovalad@ydb.tech Join our telegram chat t.me/ydb_en