Chapter 10
Performance, Scaling, and Reliability
IN THIS CHAPTER
Spotting the bottlenecks that quietly slow down your server
Caching properly to improve performance
Handling lots of users at a time
Failing gracefully when things go sideways (because they will)
Monitoring performance so that you find out about problems before your users do
Until now, I’ve been treating your MCP server like a quiet little assistant tucked away on your laptop, helping you and maybe a few coworkers get things done. That’s a perfectly fine place to start. But sooner or later — usually, right after you tell people about it — your server stops serving as a personal tool and expands into an entity that other folks depend on.
And that’s when things change. The friend who was happy to wait 2 seconds for a response now has 50 teammates pinging your server simultaneously, expecting answers in less than a second. The database query that ran beautifully on your test data is choking on production volumes. Some ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access