TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

Ask HN: How to Scale an API Globally?

1 点作者 zaksingh超过 4 年前
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?

1 comment

arachno1999超过 4 年前
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)