Chapter 84. Handling Network Failures in the Cloud
Shayon Mukherjee
In the era of cloud computing, network failures—especially transient ones—are a given. These failures come in many forms and can originate from servers, routers, load balancers, connection pools, software applications, human errors, and, of course, the DNS. Writing software applications for the cloud in a distributed system environment therefore requires an added degree of care and a resiliency mindset. Use this mindset to incorporate practices during software development that will allow your applications to withstand these failures without disrupting customer experiences.
A common way to handle network failures is through the use of timeouts, retries, and retries with backoff and jitter. As a cloud engineer, it should become part of your DNA to enforce these practices when dealing with network connectivity or similar communication protocols over the internet—because things always go wrong in production.
A timeout, in simple terms, refers to the maximum time allowed for a connection to sit idle. Lack of time-outs when combined with connectivity issues to another service often leads to increased latency and resource exhaustion. In such a scenario, a client and server are waiting on a request that may never complete, resulting in a nonoptimal customer experience. As a cloud engineer, ...
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