ABSTRACT

This chapter continues the discussion of cloud-native software designs by introducing the microservices approach, an alternative way to structure software to take advantage of multiple computers in a data center. As always, the primary goal focuses on building a software system that can use additional processors to scale computation. The chapter explains that the essence of the microservices approach lies in dividing a large, monolithic program into multiple small pieces that can each operate independently. More important, the chapter explains how each small piece can be replicated to allow the individual piece to scale as needed, independent of other pieces. The chapter considers the question of granularity (i.e., the choice of the size of pieces). It covers communication protocols used to access microservices as well as communication that occurs from one microservice to another, including a RESTful interface that uses HTTP and an RPC-style interface that uses gRPC. The chapter describes the concept of a service mesh, explains the potential for deadlock, and lists example microservice technologies.