Go for Infrastructure
TLS clients
Explain how a Go TLS client builds the certificate chain and checks the host name, and fix chain errors by correcting the server or the trust roots, not by disabling checks.
What you will be able to do
- Diagnose a chain error by reading the certificates the server sends.
- Choose a RootCAs pool that trusts only the partner's CA without turning verification off.
What is in the lesson
- A real situation where this goes wrong
- How it works, step by step
- A walkthrough with commands you can run
- How it fails in production, and how to tell
- Three quiz questions with explanations
Read this lessonFree. No account needed.
More in Go for Infrastructure
- Connection reuseBeginner · 5 min
Explain why a client that reuses an idle connection the server already closed gets EOF errors, and set its idle timeout below the shortest limit on the path.
- DNS resolverBeginner · 5 min
Explain how the Go resolver queries the servers in resolv.conf in order, why one dead nameserver causes steps of delay, and how to test each server on its own.
- Error wrappingIntermediate · 5 min
Explain how fmt.Errorf with %w builds an error chain and how errors.Is and errors.As read it, so a sentinel error still reaches the handler that picks the status code.
- Structured loggingIntermediate · 4 min
Explain why structured log fields with stable names and types can be filtered exactly, and how to keep secrets and sensitive values out of the log stream.
- Prometheus instrumentationIntermediate · 4 min
Explain why each unique label combination adds a Prometheus time series, and choose metric types, names and labels that stay bounded as the system grows.
- OpenTelemetry tracingIntermediate · 5 min
Explain spans, trace context propagation and sampling in OpenTelemetry, so the time one request spends can be followed across services, queues and background jobs, with…