Reliable Webservers with Go

In this book we show important concepts in backend web development through the lens of Go.

3.5 431 students started

Published |Updated

What You Will Learn

How to build a key value server

The importance of testing your web servers

How to monitor your web servers

How to apply distributed consensus algorithms to your key value server

How to build a canary deployment server

How to make a real time chat application

In this book we will show you the some of the concerns of backend web development through the lens of Go.

It is taught by Nat Welch (formerly an SRE at Google) and Steve McCarthy (Etsy), two Go developers who have been writing software for more than 25 years combined.

In the course, we'll be covering the creation and concerns of a number of fundamental backend building blocks or larger applications:

  • A key value server, including the use of distributed consensus algorithms
  • A canary deployment server
  • A real time chat service
  • Testing and monitoring

Regardless of your background, Go can make you a better backend developer, but learning Go is challenging because the language looks simple on the outside, but you won't get its full benefit unless you know what it can really do.

By the end of the first chapter, you'll already have built a key-value server reminiscent of similar systems like Redis and memcached. The subsequent chapters will dive into more hands-on projects and Go concepts including:

  • How to test your Go systems with unit tests and integration tests
  • Project: create a distributed version of the key-value server in order to solve the typical problems of server systems such as node failure
  • How to solve the problem of "consensus" in distributed Go systems
  • How to write code to keep data in sync when running a system for servers located around the globe
  • Implementing black box and white box monitoring systems for Go servers
  • Project: building a load balancer server from scratch
  • Why and how to implement a canary deployment server for bug-free gradual deployments
  • How to build a configuration server to allow zero-downtime deploys
  • Understanding the various tradeoffs in the design decisions for Go server systems
  • Project: build a Go chat server system from the ground up
  • Database modeling for backend development as part of your chat server project
  • and a lot more...

A Key-Value Server Like Redis And Memcached

n the early chapters of the book we learn how to build a Golang version of a key-value server that works in a manner similar to Redis and Memcached. You'll implement each of these features in Go:

  • set and retrieve values by key
  • adding persistent storage
  • using data encodings such as JSON and base64
  • testing the server with unit tests and integration tests

In these chapters, we also learn how to build a more advanced solution for the problem: a distributed version of the key-value server. You will learn how to use consensus algorithms in Go to solve the problem of keeping distributed servers in sync. The solid grounding you get in programming Go in these first chapters readies you for more complex Go projects.

A Real-Time Chat Service

A real-time chat server implemented in Go gives you the opportunity to bring together systems thinking as well as concerns common for web apps:

  • relational data modeling with SQL
  • authentication
  • implementing RESTful resources

Working through this comprehensive project will give you a high degree of confidence about using Go to implement a huge project from scratch. You will feel ready to use Go with relational databases such as PostgreSQL or MySQL, and databases in general.

A Canary Deployment Server And Load Balancer

The work you do in the chapters covering building a canary deployment server and load balancer will open your eyes to the full power of Go. Gradual deployments are a commonly used strategy for code deployments, and the projects you build in these chapters get you familiar with building this kind of infrastructure software.

Your load balancer will implement random-per-request as well as round-robin load balancing. These projects will give you a thorough immersion in systems problem solving with Go. You'll be able to show off your skills on bold projects of your own, in job interviews, and on the job when collaborating with colleagues.

This book is the fastest way to learn modern backend Go development

With The newline Guide to Reliable Webservers with Go, you won't waste time reading shallow blog posts that can't go beyond showing you the simplest Go examples or Todo apps. Instead, within the first chapter you'll be well on your way to creating a Redis-like key-value server, and the complexity of the systems you're able to build only accelerates from there.

This book opens the door to more effective backend development and utilizing the full power of Golang for microservices. As Go transforms the systems development landscape, you can use this book and the skills it teaches you to contribute to a faster, more effective systems development experience for your team.

With The newline Guide to Reliable Webservers with Go you can go from novice to proficiency in Go in a predictable way, without wasting time, and without picking up bad Go coding habits.

So grab a copy now to advance your journey with Go.

Course Content

8 modules53 lessons

Introduction

7 lessons

Projects

Join us over at the `#golang` channel in our Discord server - [here](https://newline.co/discord).

LESSON

LESSON

Distributed Key Value Server

7 lessons

LESSON

Keeping data in sync

Apply log is invoked once a log entry is committed. It returns a value which will be made available in the ApplyFuture returned by Raft.Apply method if that method was called on the same Raft node as the FSM.

LESSON

LESSON

Monitoring

6 lessons

Future thinking

3 lessons

Your Instructors

Profile image for icco

Nat Welch

Nat has been writing software professionally since 2005 and in 2012, Nat became a Site Reliability Engineer at Google and fell in love with the specialty. Since then, he has worked at companies of all sizes trying to promote reliability and help developers build reliable systems.

Nat has been writing software professionally since 2005 and in 2012, Nat became a Site Reliability Engineer at Google and fell in love with the specialty. Since then, he has worked at companies of all sizes trying to promote reliability and help developers build reliable systems. He is also the author of Real-World SRE.

Profile image for ifo

Steve McCarthy

Steve has been writing software professionally since 2011, and started with Go while attending the Recurse Center in 2015. Steve loves how simple the language is, how fast it compiles, and how expansive the standard library is. He is currently a Senior Software Engineer at Etsy.

Frequently Asked Questions

Who is this course for?

This course is for programmers who want to get started writing API and web-servers in Golang. It's assumed that you already are comfortable programming another language (e.g. JavaScript) and you want to write applications in Go as quickly as possible.

What if I need help?

You can ask us questions anytime in the community Discord channel!

OrGet this course and every newline Book and Guide with a newline Pro subscription for just $20/mo

$39

$49

  • Learn to write Golang apps

  • Build a variety of webservers

  • Create production-ready API servers

Student Review

Uian Sol

2 years ago

5.0

I was looking for a new job with Golang. I used the Golang book from newline and I made a project based on this book to use in my portfolio. In just a few weeks, I got a new position with Golang. Thanks, your books are important for my career development.

Reliable Webservers with Go

$39

$49