• करीब 10 साल पहले RoR और single MySQL instance के साथ शुरुआत करने वाला GitHub

  • 2019 में partitioning शुरू की और 2 साल तक कई तरह के काम किए, उनका अनुभव

→ 2021 तक DB का load 50% कम हो गया

  1. virtual partition
  • असली tables को शिफ्ट करने से पहले application layer पर virtual तरीके से अलग किया

  • tables को group करके schema domain में बांधा, और SQL Linter की मदद से boundaries लागू कराईं

→ ताकि बाद में partitioning करते समय यह सुरक्षित रहे

  • Query Linter और Transaction Linter से virtual boundaries की जांच की
  1. downtime के बिना data migrate करना
  • Vitess के Vertical Sharding feature का उपयोग किया

→ VTGate को Kubernetes cluster में deploy करने के बाद connection point बदल दिया

  • write-cutover process लागू की

→ MySQL के Replication feature का उपयोग करके data को दूसरे cluster में feed किया

→ ProxySQL का उपयोग करके MySQL client connections को multiplex किया

परिणाम

  • 2019 में single cluster रहा mysql1 औसतन 9.5 लाख queries प्रति सेकंड का response देता था

  • 2021 में यह multi-cluster में distributed हो गया, और औसतन 12 लाख queries प्रति सेकंड का response देते हुए host load आधा हो गया

अभी कोई टिप्पणी नहीं है.

अभी कोई टिप्पणी नहीं है.