Upgrade to Pro — share decks privately, control downloads, hide ads and more …

From PHP to Golang: Migrating a real-time data replication service

Eric Khun
September 01, 2020

From PHP to Golang: Migrating a real-time data replication service

Eric Khun

September 01, 2020
Tweet

More Decks by Eric Khun

Other Decks in Programming

Transcript

  1. Buffer • 80 awesome people , 12 timezones, all remote

    • USD ~20 millions Annual Recurrent Revenue • 75,000+ paying customers ~7 millions users
  2. Infrastructure metrics • 1 Kubernetes cluster | ~60 ec2 instances

    • ~800,000 “posts” sent per day to social medias • 1000 “external” requests per second • 1400 AWS SQS queue messages to process per second
  3. A system to search users / profile / updates •

    MongoDB isn’t great for search / auto completion • Elasticsearch is better for that • We use SQS to say we need a message to copy data from mongoDB to Elasticsearch
  4. Reasons to migrate • Too frequent paging alerts (using engineering

    time) • Using 37 CPU cores (8 servers! ), and growing • PHP libraries memory leaks (not PHP!) • Unstable resource usage , pods restarts (OOMKill) • Only used for customer support or troubleshooting - cost not justified