📜 ⬆️ ⬇️

Reliability Go in Dropbox infrastructure

About the author: Tammy Butov is the technical head of the infrastructure for developers at Dropbox. This code flow control is the complete cycle of using Go in Dropbox, from programming to release. She spoke at the GopherCon 2017 conference on how Dropbox developers create and maintain large-scale Go services.

How Dropbox Came to Use Go


Tammy quotes Rob Pike's article “ Go at Google: language design in software development ” from 2012, because it generally conveys well why Go works well in Dropbox:

“Go is an efficient, scalable and productive language. Some programmers enjoy working with it; others find it prosaic, even boring. In this article we will explain why all these positions do not contradict each other. Go is designed to solve the problems that arise in software development at Google, which led to the creation of a language that is not a breakthrough from a research point of view, nevertheless it is a great tool for developing large software projects. ” - Rob Pike, 2012

Dropbox scale is impressive:
')

As a result, Dropbox requires a lot from its systems, languages, and developers. The guiding principles and requirements are as follows:


Go State in Dropbox


Today, most of the Dropbox infrastructure is written in Go. In particular:


Some of the key systems written in Go are:


Many of these are successors of previous systems not on Go.

How did Dropbox start using Go?


Tammy shared several stories of how Dropbox naturally went over to Go.

The prototype of the speed limiter on Go from the hacker week
Before the hacker week that happened once, the developers of Dropbox implemented a speed limit and throttling separately for each service where it was required. But for this hacker week, one Dropbox engineer decided to create a single implementation of these functions. This is how RAT (Rate limiting And Throttling) was born.

The first RAT prototype was created in four days and is shown on the fifth. Within a few weeks after the creation of the RAT, information about it spread throughout the company. Another Dropbox engineer wrote a suggestion to Tammy to see how they can use RAT from the Python project. The integration went smoothly, the service was accepted naturally - and soon RAT began to bring benefits. Now several Dropbox teams use RAT.

Dbmanager
Dropbox has more than 6,000 databases, and such a large system requires automation and monitoring. At any given time, there is database replication, crashes, transfer from a regular replica to a primary replica, and so on.

To manage this process, Dropbox engineer developed Dbmanager - UI on the web to quickly view the status of all more than 6000 databases. Status information is also transmitted to other systems.

Update Go versions to Dropbox
With hundreds of developers, Dropbox neatly coordinates the update of major versions of Go. Tammy didn’t mention any specific issues, indicating a smooth process!

Some interesting facts:


How Dropbox engineers master Go


Every Dropbox engineer goes through the same rigorous Go process, which consists of the following steps:


For an experienced programmer, the process takes about a week.

What went smoothly with the introduction of Go at Dropbox? And what not?


Overall, the use of Go in Dropbox's has been very successful.


Here, one of the important facts is that Dropbox does not attempt to rewrite Go services in other languages. This is a sign that people are generally satisfied. (Tammy gave an intriguing detail: Dropbox uses Rust a bit. But he is not considered a replacement for Go).

What complicated Dropbox found in Go?


The greatest difficulty Tammy called the work with the state of the race.


Dropbox is recruiting engineers who care about data reliability and durability, so it was easy for them to understand (although simultaneous access is difficult all the time).

Source: https://habr.com/ru/post/335056/


All Articles