Menu

Why Moving Only the Web Server to a Neighboring Region Is a Mistake — 5ms vs 37ms DB Round Trips
📰

Why Moving Only the Web Server to a Neighboring Region Is a Mistake — 5ms vs 37ms DB Round Trips

DEV Community: aws·sunah kim·9 days ago
#aR4wNH2d
#devtoaws#devto#dev#server#30ms
Reading 0:00
15s threshold

The request

On a production e-commerce site (EC-CUBE), the request came in: "we'd like the production server to live in the Japan region." Understandable — the users are in Japan, so the server should be too, right?

Except the managed database for this system lives in the Seoul region. What happens if you move only the web server to Tokyo? As it turned out, we already had a live example in-house: the dev server in Tokyo (with its DB in Seoul) felt about 4x slower than production. For a long time everyone blamed "dev is just a cheaper instance." The real cause was somewhere else entirely.

The symptom — only the dev server is slow

Production (Seoul) and dev (Tokyo) run the same code against similar-sized data. Still, only dev takes seconds to render a page. Comparing instance plans showed no meaningful difference.…

Continue reading — create a free account

Join HashtagPLUS to read full articles, follow hashtags, vote, and join the conversation.