This is a creation in Article, where the information may have evolved or changed.
Tammy cites Rob Pike's "Google Go language: A programming language designed for software engineering services," written in 2012, explaining why the go language can play an important role in Dropbox:
"Go language is efficient, scalable and highly productive. Some programmers are happy to use it, but some people think it is hard to understand and even boring. In this article, we will explain why these positions are not contradictory in themselves. The go language is designed to help Google solve the problems it faces in software development, which means that although it is not a groundbreaking research language, it remains a great tool for large software engineering projects. "-rob Pike, 2012
Dropbox has a huge business size:
- More than 500 million users;
- 200,000 business customers;
- petabytes of user data;
- Data EB go Storage System.
Because of this, Dropbox has made very high demands on its own systems, languages and engineers. Its guiding principles and requirements include:
- Build high reliability system;
- Building security systems;
- Incorporating reliability and safety into the initial design;
- The reliability needs to reach 99.9999999999% (12 x 9);
- Availability needs to reach 99.99%.
Dropbox Company to Go Application of Language
Currently, most of Dropbox's infrastructure is written in the go language, including:
- The Go Server Library has 150 contributors (from a total of 500 engineers);
- More than 15 teams within Dropbox are responsible for building and running go services;
- Dropbox has 1.3 million lines of go code inside;
Other critical systems are also written in the Go language:
- RAT: Speed limit and current limit tool.
- Alternative to hat:memcached.
- AFS: A set of file systems used to replace global zookeeper.
- Edgestore: Distributed database.
- Bolt: Used to send and receive messages.
- DBmanager: Used to automate the management and monitoring of more than 6000 databases in Dropbox.
- "Jetstream", "telescope", chunked Routing and more ...
A significant portion of this is inherited from the original non-go system.
Dropbox Why did the company choose to use go?
Tammy also shared the anecdotes that Dropbox has added to the Go language usage step-by-step.
Hack Technical Week Achievements Go prototype design of rate limiter
Prior to the hack Technology Week of the year, Dropbox engineers planned to limit and limit the flow of services separately. As a result, an engineer decided to build a common service to achieve these goals within the next hack technology week-and the rat was born.
The rat's initial prototyping was built within 4 days and was released on the 5th day of the demo. Just a few weeks later, the rat's name spread rapidly inside the company. Another Dropbox engineer contacted the Tammy team via e-mail to see how it used the rat in the Python project. The whole process of integration is progressing smoothly, the adoption rate of rats is increasing, and practicality is rapidly increasing. Currently, there are many teams in Dropbox that are using rats.
DBmanager
Dropbox has more than 6000 databases, and such large systems naturally require automated management and monitoring measures to complement them. In fact, these databases are replicated, failed over, and subject-upgraded through replicas, anytime, anywhere.
To manage all this, one of Dropbox's engineers developed dbmanager--, a Web UI that helps administrators quickly see what's happening in all 6,000 + sets of databases. In addition, it is also able to publish status information to other systems.
Dropbox in the company Go the path of version upgrade
With hundreds of engineers, Dropbox is carefully coordinating the upgrade of major versions of the Go language. However, Tammy did not mention any problems caused by the upgrade, which indicates that the whole process should be quite smooth!
Let's look at some interesting facts:
- Dropbox recently completed the upgrade from Go 1.5 to 1.6 in its production service;
- To track the upgrade process, the staff created a simple Dropbox paper document and asked for each service.
The holder reports progress and, if necessary, applies for help.
Dropbox decided to skip go 1.7 and upgrade directly to version 1.8 after the 1.6 migration was completed, including non-production services.
Dropbox How does the company guide new engineers to use Go language
Each Dropbox engineer is required to undergo the same rigorous go language training process, including:
- Read the infrastructure topology, go language style guide, and protobuf style guide.
- Strict but friendly code review.
- Use the Go language to build an entertaining app (a suite of app stores).
- Learn to build and test go code with Bazel.
An experienced engineer takes about a week to complete the above training.
Go language is Dropbox What benefits does the company bring? What deficiencies exist?
Overall, Dropbox's go application path was a success.
- Easy to produce in the go language environment.
- Easy to write and consume services in the go language environment. (People are also passionate about this!) )
- The Go Language standard library is excellent.
- The Debug tool (overall) works well.
The key is that Dropbox does not have the effort to rewrite the services written by go into other languages, which suggests that people are quite satisfied with them. (Interestingly, Tammy says Dropbox is also partially using rust, but it is not a substitute for go.) )
Dropbox Company in use Go What difficulties do you encounter with your language?
Tammy confirmed that the biggest problem with the go language is dealing with race conditions.
- The data race class bug gives the debugging, the query and the repair and so on the work to bring the challenge.
- Some Dropbox engineers are particularly adept at handling the query mechanism of the go language, while others choose to play their part.
- Go data race detectors sometimes don't work. It is important to determine this non-functional situation.
- Go programs that require concurrent access to data must be designed with caution.
Dropbox pays attention to the reliability and durability of engineers, so they should be able to solve the problem (in fact, this concurrency problem is quite difficult in any language environment).
view original link: https://about.sourcegraph.com/go/ Go-reliability-and-durability-at-dropbox-tammy-butow