Introduction

In the coming years, businesses will need to store, transfer, and process increasingly large amounts of data. This will happen mainly due to the exponential growth of technology and our increasing dependency on it. As a result of this wave, the demand for engineers who are able to build scalable systems is going to increase as well.

The initial idea for the book came to me when I realized that most engineers either know a lot about scalability or nothing at all. I realized that there is not enough literature on the subject and that there is no easy way for engineers working in smaller companies to “get to the next level” in terms of understanding scalability. With this in mind, I set out a goal of writing a book that would help people understand the bigger picture and create awareness of how software architecture and the infrastructure work together to promote scalability.

I think of this book as a roadmap for readers to use in their journey to web application scalability. I present both a high-level perspective and a deep dive into important aspects to give real-world advice. There are too many technologies to go through everything in detail, but it is possible to explain concepts and basic rules and showcase selected platforms.

Chapter 1: Core Concepts

The first chapter of this book provides an introduction to the concepts of scalability and a very high-level overview of the book. In this chapter, I propose different stages of web application evolution in terms of scalability as a way to gradually introduce various concepts. I also present an overview of the infrastructure and architecture of a scalable web application.

Chapter 2: Principles of Good Software Design

In this chapter, I discuss different design principles and considerations that are necessary to build flexible and scalable systems. I start with the broadest concepts, like simplicity and coupling, and then discuss some object-oriented design principles, like single responsibility and dependency injection. Finally, I move to design concepts directly related to scalability, like functional partitioning, data partitioning, and self-healing.

Chapter 3: Building the Front-End Layer

In this chapter, I focus on parts of the infrastructure that are directly interacting with the client’s software, like web browsers or mobile apps. I explain in-depth ways of handling state in the front-end layer. Then I discuss different components of a scalable front end, like load balancers, proxies, and content delivery networks. Finally, I discuss auto-scaling and different deployment scenarios.

Chapter 4: Web Services

In this chapter, I discuss the benefits and drawbacks of different web service architectures. I explain design principles and go into details of scalability techniques in the context of REST-ful APIs.

Chapter 5: Data Layer

In this chapter, I explain core scalability techniques. I discuss techniques relevant to relational databases like MySQL, but also spend a lot of time discussing NoSQL data stores like Cassandra. Throughout the chapter I explain in detail concepts such as data partitioning (aka sharding), replication, and eventual consistency. I also compare different data layer topologies and challenges related to each of the techniques.

Chapter 6: Caching

In this chapter, I focus on caching, which is one of the key strategies of scalability and high performance. Throughout the chapter I explain in detail HTTP-based caching, different types of HTTP caches, and techniques of scaling HTTP caches. I then describe object caches and common ways of scaling them out. Finally, I spend some time explaining caching best practices, which should help you make better decisions and prioritize your efforts more efficiently when implementing caching.

Chapter 7: Asynchronous Processing

In this chapter, I explain the increasingly popular subjects of messaging and event-driven architecture. I begin by explaining the concepts and benefits of asynchronous processing and how to leverage message brokers to scale web applications. Then, I highlight some of the challenges and pitfalls you may expect when working with asynchronous systems. Finally, I briefly compare some of the most popular messaging platforms to help you choose the best tool for the job.

Chapter 8: Searching for Data

In this chapter, I focus on the wider problem of searching for data. Searching for data is closely related to data stores, and as your data sets grow, it becomes increasingly important to optimize the way you search for and access data. I begin by explaining how different types of indexes work. I then spend some time discussing data modeling, which helps scalability, and how you can think of data modeling in NoSQL data stores like Cassandra. Finally, I provide an introduction to search engines and how they can be used in the context of a web application.

Chapter 9: Other Dimensions of Scalability

In the final chapter of this book, I describe other concepts necessary to scale your throughput, managing yourself better and growing your team. I begin by emphasizing the role of automation as the key technique of increasing engineering efficiency. I discuss topics such as automated testing, deployments, monitoring, and alerting. I then share my own experiences and observations related to project management, which should help you survive in a startup. Finally, I reflect on the challenges of growing agile teams.

Intended Audience

I wrote this book with software engineers, engineering managers, DevOps, and system engineers in mind. The book may be challenging for university students, but it should be understandable for any mid-level and even junior engineer.

I assume readers have a basic understanding of how web applications are built and how related technologies work together. Reading this book does not require you to have knowledge of any particular technology stack like Java, PHP, JavaScript, C#, or Ruby because scalability is a universal challenge in web development. I do assume that readers understand how the HTTP protocol works and that they have basic knowledge of IP networking, HTML, and client-server software development concepts.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.191.240.243