liveBook · Manning

Microservice architecture

As explained in Go in Practice, Second Edition

A microservice architecture is an application architecture composed of independently deployable services that communicate over a network.

A microservice architecture divides an application into independently deployable services, each responsible for a specific purpose. Services can scale horizontally and remain available when individual instances fail. The approach applies the UNIX principle of doing one thing well to distributed applications. section 12.2

A service in this architecture typically:

  • Performs one focused action, such as storing configuration or transcoding media. section 12.2
  • Scales up or down independently as its workload changes. section 12.2
  • Continues operating through problems affecting individual application instances. section 12.2
  • Communicates with other services through network protocols or messaging infrastructure. section 12.3

Media transcoding pipeline

A user interface sends uploaded media to an API server. The API stores the media and places a transcoding job on a message queue. Transcoder services consume jobs, write converted files to storage, and enqueue notification jobs. The user interface later retrieves the converted file. A Go service can connect to Kafka, read batches from a media topic, and transcode the media or pass work to another service. section 12.2 section 12.2

Figure 12.3 A simple transcoding application broken into microservices
figure

Trace the upload, storage, queue, transcoding, notification, and download services in the transcoding architecture. section 12.2

Communication becomes a performance concern as the number of services grows. REST over TLS can impose substantial network overhead across a multi-service workflow; faster approaches such as gRPC or a dedicated networking layer can reduce that cost. section 12.3

How Go in Practice, Second Edition covers it

How deep it goes
Defines service boundaries and communication trade-offs, then demonstrates Kafka-based message consumption without detailing deployment mechanics.
Examples
Uses a media transcoding workflow and a Go Kafka consumer that reads media batches for processing or delegation.
What it assumes
Assumes familiarity with developing and testing Go applications before addressing deployment and cloud operation.
What you can do after
Build it from scratch by separating focused Go services, routing work through queues, and selecting communication methods for performance.
How it connects
Connects cloud computing, horizontal scaling, message queues, REST, TLS, gRPC, and the UNIX philosophy.

Also explained in

Compare how 14 books explain microservice architecture →

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Go in Practice, Second Edition. The section links point to the parts of the book it draws on.