Chapter 5. Application Services

At the heart of any system lies the unique business logic that implements the application requirements. In distributed systems, this is exposed to clients through APIs and executed within a runtime environment designed to efficiently support concurrent remote calls. An API and its implementation comprise the fundamental elements of the services an application supports.

In this chapter, I’m going to focus on the pertinent issues for achieving scalability for the services tier in an application. I’ll explain APIs and service design and describe the salient features of application servers that provide the execution environment for services. I’ll also elaborate on topics such as horizontal scaling, load balancing, and state management that I introduced briefly in Chapter 2.

Service Design

In the simplest case, an application comprises one internet facing service that persists data to a local data store, as shown in Figure 5-1. Clients interact with the service through its published API, which is accessible across the internet.

A simple service
Figure 5-1. A simple service

Let’s look at the API and service implementation in more detail.

Application Programming Interface (API)

An API defines a contract between the client and server. The API specifies the types of requests that are possible, the data that is needed to accompany the requests, and the results that will ...

Get Foundations of Scalable Systems now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.