Understanding Web Applications: Insights from Medium's Architecture
Written on
Chapter 1: The Cloud Computing Landscape
The global cloud computing industry was valued at approximately USD 483.98 billion in 2022 and is projected to grow at a compound annual growth rate (CAGR) of 14.1% from 2023 to 2030.¹
What does cloud computing truly mean? It’s a term we hear constantly, yet many still wonder about its implications. Most large-scale web applications rely on cloud infrastructure, and throughout this discussion, we will frequently reference this concept.
This series is tailored for individuals who may not have extensive knowledge of software but are eager to understand its workings. In Part 1, we examined how teams collaborate to develop web applications. Part 2 delved into the software development process. Now, in Part 3, we will explore the operational aspects of web applications in production.
Understanding "the Cloud"
Cloud computing simplifies the management of computing resources. Before the advent of cloud technology, these resources were housed in centralized data centers owned by enterprises.
Take Facebook, for instance. In 2006, it operated from a data center that managed 10 million users. Jeff Rothschild, the VP of Technology, remarked on the lengths they went to for cooling: “We cleaned out all of the Walgreens in the area to blast cool air at the equipment and prevent the Web site from going down.”
However, shortly afterward, Facebook transitioned much of its operations to the cloud. A cloud is essentially a network of data centers managed by third-party providers, like Amazon, which pioneered large-scale cloud services. In this model, while Facebook manages its software, the cloud provider maintains the data center, eliminating the need for clients to worry about infrastructure logistics.
What does this mean for public clouds? The cloud provider owns and maintains all the hardware and operating systems, while clients like Facebook handle the operation of their applications. This shared resource model allows clients to scale their computing needs efficiently, as they can adjust their usage based on demand rather than maintaining excess capacity.
Value-added services from cloud providers also enhance efficiency. For instance, a cloud client needing user authentication can leverage services like AWS Cognito. Since multiple clients utilize these services, the cloud provider can offer them at lower costs than if each client managed their own systems.
Section 1.1: Software Architecture and Its Impact
Software architecture serves as the blueprint for application design. Two prevalent paradigms are monolithic and microservices architectures. A monolithic application is constructed as a single entity, comprising a client-side user interface (front end) and a back end that processes requests and interacts with databases.
In this scenario, altering any component requires rebuilding and redeploying the entire application. Conversely, a microservices architecture consists of independent services that communicate with one another, allowing for greater flexibility and easier updates.
While microservices facilitate independent development and deployment, they can introduce challenges. Poor communication between teams may lead to issues where changes in one service inadvertently affect others. Nevertheless, the benefits of flexibility generally outweigh these risks.
The architecture of an application significantly influences its deployment and management. This article will focus on microservices, as the industry increasingly favors this approach.
Takeaway 1: In straightforward systems, breaking components apart may be unnecessary. For example, a baseball bat is a single piece that functions well without assembly. However, in software, modular design allows for enhanced flexibility, which is beneficial throughout the web application lifecycle—from development to deployment and monitoring.
Section 1.2: The Role of DevOps in Web Applications
While Part 2 of this series explored software development, we did not cover a vital category of developers: DevOps engineers. DevOps combines development and operations, bringing automation and efficiency to web application management.
Historically, operations teams managed web applications manually, which often led to overwhelming workloads. Fortunately, many companies have shifted to employing DevOps teams to streamline this process. These professionals focus on building tools that facilitate the efficient operation of web applications, rather than just code development.
A challenging aspect of managing large-scale web applications is anticipating potential issues. For instance, the recent Twitter Spaces incident during Ron DeSantis' campaign announcement was a clear case of avoidable failure. Proactively identifying and automating responses to potential problems is central to the DevOps mission.
Cloud providers offer various tools to assist in managing cloud deployments, exemplified by AWS CloudWatch.
Key Features of Cloud Redundancy
One of the primary advantages of cloud infrastructure is redundancy. Most public clouds, including AWS, provide multiple redundancy layers. AWS maintains data centers across 23 global regions, and each region consists of several availability zones (AZs), which are independent data centers.
Typically, web applications are deployed across numerous instances, ensuring that if one instance fails, a replacement is seamlessly activated.
How Software is Deployed
Once development teams deem software ready, it is deployed to the cloud using proprietary or cloud-provided tools. Unlike traditional computers, cloud systems consist of highly efficient computing units accessed through software tools.
The architecture significantly impacts deployment. In a microservices setup, individual services can be upgraded independently, whereas a monolithic structure requires a complete overhaul, introducing substantial risk.
Monitoring Web Applications in Production
Effective monitoring of web applications is critical but can be technically complex. A multitude of metrics must be monitored to ensure optimal performance. For example, if a crucial service experiences high traffic, it could jeopardize the entire application. Continuous monitoring of key metrics is essential, and in advanced systems, this process is automated to alert developers when issues arise.
Knowledge Retention and Its Importance
As web applications scale, a significant amount of accumulated knowledge is necessary to maintain their performance. A loss of this knowledge can lead to service degradation.
For instance, reports indicate that Twitter has faced multiple service disruptions, with a noted increase in outages since Elon Musk's cost-cutting measures began.
Takeaway 2: Cost-cutting strategies that reduce staff in complex systems like Twitter can lead to predictable failures. Just as you wouldn't significantly reduce staff at a nuclear power plant without repercussions, the same principle applies to web applications.
Conclusion
In this three-part series, we explored:
- Team organization in web application development.
- The software development process.
- The operational aspects of web applications.
There's a wealth of information to cover, and this overview merely scratches the surface. If you have any questions or need clarification, please feel free to reach out!
In this video, discover how you can earn $1,000 monthly by writing articles on Medium as a part-time writer.
This video guides you through the process of writing and publishing on Medium.com, including creating an account, publishing a story, and submitting to a publication.