Where is my mongo cluster?
summary
Allegro moves ~1,000 MongoDB clusters into Kubernetes using statefulsets with headless services and per-cluster zone suffixes so node hostnames remain unique; a custom DNS proxy plugin rewrites and splits queries across regions, serves SRV entries with only healthy members, and returns node IPs for drivers. Workarounds include avoiding CPU limits on latency‑sensitive mongod, removing unsupported AAAA/TXT records, and switching from sequential to parallel split queries; a DR test exposes a timeout bug that gets fixed so the solution works in failover.
AI-written summary · about
chapters (11)
- 0:00Introduction and agenda
- 2:59Allegro tech platform principles
- 9:06Why MongoDB in microservices
- 13:27Shifting MongoDB to Kubernetes
- 16:23Kubernetes cluster challenges
- 18:55Connecting MongoDB nodes across clusters
- 23:37External connections to MongoDB
- 27:33DNS proxy solution overview
- 33:22Production deployment and testing
- 37:47Disaster recovery test results
- 39:14Q&A and closing
