For almost 45 minutes on Tuesday morning, a significant chunk of web did not work. People visiting popular sites like Reddit, Hulu, Guardian received blank white page with dreaded HTTP 503 error. Though the issue was local instead of universal as users in Germany were getting proper response.
Later we found out the issue was with the Edge cloud server. What is Edge servers and how it helps to make web faster with low latency. Let’s discuss.
On Tuesday CDN (Content Delivery Network) company Fastly admitted a single user brought down the website when the user changed the setting which triggered a bug in the software. The irony is that the infrastructure that is supposed to make your applications resilient and fast can be so fragile. The bug was included in a software patch update in May and was undetected in regression and load testing. In the ERA of SDET and Full Stack, we often ignore the quality of real testing. Hopefully we will learn the lesson and do quality check for all patches, major and minor, in future.
We use CDNs in all application developments for long. Bootstrap and JS files are fetched from CDN in traditional on premise server design as well. Cloud providers like AWS and Azure make it easy to use CDN in front of your application load balancer or storage services like S3 to make the fetch more quick. The idea is instead of going all the way to server instance, EC2 or VM, direct the user requests to the nearest Edge servers. AWS offering Cloud Front has global PoPs (points of presence) and the PoPs are interconnected with AWS backbone — a private network which delivers low latency and fault redundant performance. Currently AWS has almost 225 PoPs and comes with inbuilt DDos Protection. You can further restrict cloud front access by Signed URLs or signed cookies to restrict to a certain section of users. Based on user origin, the request hits the local PoP server and content is delivered to client with low latency and avoiding multiple hops to actual server or S3 which may be in different region or availability zone.
Azure has similar offering with the same name, CDN, and has same features as global coverage, massive scalability. We can integrate CDN with most of the Azure services like Web App, storage and media services. Azure CDN also comes with integrated DDoS attack protections and enables HTTPs traffic out of the box.
As we started the article with, though the new offerings brings many smart capabilities to the table including highly available, resilient and low latency design, we should not ignore traditional development processes including hard testing, load testing to prevent future outages.