This story was originally published on HackerNoon at:
https://hackernoon.com/how-we-rebuilt-photons-shared-imessage-routing-to-handle-10m-messages-a-day.
How we rebuilt Photon's shared iMessage routing to handle 10M+ messages a day — migrating Bun to Node, fixing a memory leak, and adding a Postgres event log.
Check more stories related to tech-stories at:
https://hackernoon.com/c/tech-stories.
You can also check exclusive content about
#imessage,
#messaging-app,
#photon-imessage-api,
#imessage-ai-agent-platform,
#imessage-routing,
#message-scaling,
#postgres,
#good-company, and more.
This story was written by:
@photonhq. Learn more about this writer by checking
@photonhq's about page,
and for more stories, please visit
hackernoon.com.
TL;DR: We rebuilt Photon's shared iMessage routing to handle 10M+ messages a day reliably. We migrated the runtime from Bun to Node.js to unlock OpenTelemetry tracing and kill silent gRPC failures, fixed a Promise.race memory leak that ballooned pods to 5 GB, corrected a binding-cache bug that silently dropped messages, and replaced per-request fan-out with a durable Postgres event log — deleting 5,207 lines of coordination code along the way.