Muutke küpsiste eelistusi

Distributed Services with Go: Your Guide to Reliable, Scalable, and Maintainable Systems [Pehme köide]

  • Formaat: Paperback / softback, 225 pages, kõrgus x laius x paksus: 234x189x14 mm, kaal: 494 g
  • Ilmumisaeg: 03-Jun-2021
  • Kirjastus: The Pragmatic Programmers
  • ISBN-10: 1680507605
  • ISBN-13: 9781680507607
  • Formaat: Paperback / softback, 225 pages, kõrgus x laius x paksus: 234x189x14 mm, kaal: 494 g
  • Ilmumisaeg: 03-Jun-2021
  • Kirjastus: The Pragmatic Programmers
  • ISBN-10: 1680507605
  • ISBN-13: 9781680507607
This is the book for Gophers who want to learn how to build distributed systems. You know the basics of Go and are eager to put your knowledge to work. Build distributed services that are highly available, resilient, and scalable. This book is just what you need to apply Go to real-world situations. Level up your engineering skills today.

Take your Go skills to the next level by learning how to design, develop, and deploy a distributed service. Start from the bare essentials of storage handling, then work your way through networking a client and server, and finally to distributing server instances, deployment, and testing. All this will make coding in your day job or side projects easier, faster, and more fun.

Create your own distributed services and contribute to open source projects. Build networked, secure clients and servers with gRPC. Gain insights into your systems and debug issues with observable services instrumented with metrics, logs, and traces. Operate your own Certificate Authority to authenticate internal web services with TLS. Automatically handle when nodes are added or removed to your cluster with service discovery. Coordinate distributed systems with replicated state machines powered by the Raft consensus algorithm. Lay out your applications and libraries to be modular and easy to maintain. Write CLIs to configure and run your applications. Run your distributed system locally and deploy to the cloud with Kubernetes. Test and benchmark your applications to ensure they're correct and fast.

Dive into writing Go and join the hundreds of thousands who are using it to build software for the real world.

What You Need:

Go 1.13+ and Kubernetes 1.16+
Acknowledgments ix
Introduction xi
Part I Get Started
1 Let's Go
3(10)
How JSON over HTTP Services Fits into Distributed Systems
4(1)
Set Up the Project
5(1)
Build a Commit Log Prototype
6(1)
Build a JSON over HTTP Server
7(3)
Run Your Server
10(1)
Test Your API
11(1)
What You Learned
11(2)
2 Structure Data with Protocol Buffers
13(10)
Why Use Protocol Buffers?
14(2)
Install the Protocol Buffer Compiler
16(1)
Define Your Domain Types as Protocol Buffers
17(2)
Compile Protocol Buffers
19(1)
Work with the Generated Code
20(1)
What You Learned
21(2)
3 Write a Log Package
23(32)
The Log Is a Powerful Tool
23(2)
How Logs Work
25(1)
Build a Log
26(25)
What You Learned
51(4)
Part II Network
4 Serve Requests with gRPC
55(20)
What Is gRPC?
55(1)
Goals When Building a Service
56(2)
Define a gRPC Service
58(2)
Compile with the gRPC Plugin
60(1)
Implement a gRPC Server
60(8)
Register Your Server
68(1)
Test a gRPC Server and Client
68(5)
What You Learned
73(2)
5 Secure Your Services
75(24)
Secure Services in Three Steps
76(2)
Authenticate the Server with TLS
78(8)
Authenticate the Client with Mutual TLS Authentication
86(2)
Authorize with Access Control Lists
88(10)
What You Learned
98(1)
6 Observe Your Systems
99(14)
Three Types of Telemetry Data
99(4)
Make Your Service Observable
103(6)
What You Learned
109(4)
Part III Distribute
7 Server-to-Server Service Discovery
113(28)
Why Use Service Discovery?
113(1)
Embed Service Discovery
114(2)
Discover Services with Serf
116(7)
Request Discovered Services and Replicate Logs
123(11)
Test Discovery and the Service End-to-End
134(4)
What You Learned
138(3)
8 Coordinate Your Services with Consensus
141(30)
What Is Raft and How Does It Work?
141(3)
Implement Raft in Our Service
144(19)
Multiplex to Run Multiple Services on One Port
163(6)
What You Learned
169(2)
9 Discover Servers and Load Balance from the Client
171(22)
Three Load-Balancing Strategies
171(1)
Load Balance on the Client in gRPC
172(2)
Make Servers Discoverable
174(3)
Resolve the Servers
177(6)
Route and Balance Requests with Pickers
183(5)
Test Discovery and Balancing End-to-End
188(1)
What You Learned
189(4)
Part IV Deploy
10 Deploy Applications with Kubernetes Locally
193(26)
What Is Kubernetes?
193(1)
Install kubectl
194(1)
Use Kind for Local Development and Continuous Integration
195(1)
Write an Agent Command-Line Interface
196(5)
Build Your Docker Image
201(1)
Configure and Deploy Your Service with Helm
202(11)
Advertise Raft on the Fully Qualified Domain Name
213(4)
What You Learned
217(2)
11 Deploy Applications with Kubernetes to the Cloud
219(10)
Create a Google Kubernetes Engine Cluster
220(2)
Create Custom Controllers with Metacontroller
222(6)
Deploy to the Internet
228(1)
What You Learned
228(1)
Index 229
Travis Jeffery is a Canadian designer, programmer, and writer. He has been creating software for over 15 years, writing open source software and building several startups from the ground up, including Segment and Confluent.