
Ask HN: How to Scale an API Globally? - zaksingh
Our small startup has managed to gain traction in the US, UK, and India. All 3 regions are desirable. Currently we are hosting a GraphQL API on Heroku and our DB and some other services (an Ejabberd server) on GCP. These are all in the US.<p>Users in the UK and India complain that our app is very slow. I can replicate this by running through a VPN in those regions. In the US the performance is fine.<p>So, my question is: how do people handle this? I could host API server instances in Europe &#x2F; India, but shared resources like the database can only live in one place. All of our app features are dynamic and therefore a CDN wouldn&#x27;t do much.<p>This feels like it would be a common problem to have these days, especially in the mobile app world. It&#x27;s such an obvious problem that I feel as if I&#x27;m asking a stupid question.<p>How do you guys approach scaling your backend globally?
======
arachno1999
I‘m afraid, there‘s no General solution. There are multiple solutions for
distributed systems like Ceph for file systems or diverse distributed
databases. But it all depends on the application. Does ist really need Shared
resources? I.e. Isn‘t a replicated DB sufficient ? Those are the questions to
make. The extremest solution is the one virtual server Fiats one customer
approach (which i‘m building for a customer actally)

