Slideshare uses cookies to improve functionality and performance, and to provide you with relevant advertising. If you continue browsing the site, you agree to the use of cookies on this website. See our User Agreement and Privacy Policy.

Slideshare uses cookies to improve functionality and performance, and to provide you with relevant advertising. If you continue browsing the site, you agree to the use of cookies on this website. See our Privacy Policy and User Agreement for details.

Go After 4 Years in Production - QCon 2015

Being one of the first companies (Iron.io) to use Go in production, the first to publicly hire Go developers and organizers of the largest Go meetup in the world, Travis has a unique perspective on the language and the community around it. Since we started using it, it has become one of the fastest growing languages and is being used in almost all startups (and non-startups) in some way or another. After making the switch from Ruby to Go - there’s plenty to be said after 4 years. A discussion on performance, memory, concurrency, reliability, and deployment are key to exploring Go and it’s value in Production. See how it’s worked for Iron.io, strategies for finding talent and explore the community.

18.
A goroutine is like a super light weight thread.
Running hundreds of thousands of goroutines is no problem (unlike threads).
You don’t need to think much about them (unlike threads).
Goroutines are multiplexed onto threads behind the scenes.
Goroutines

22.
Quote - Rob Pike - 2011
“We realized that the kind of software we build at Google is not
always served well by the languages we had available. Robert
Griesemer, Ken Thompson, and myself decided to make a
language that would be very good for writing the kinds of
programs we write at Google.”

33.
It Was a Risky Decision
● New technology, not proven
● There wasn’t a big community
● There wasn’t a lot of open source projects
● There weren’t any success stories of production usage
● We weren’t sure if we could hire top talent
● We were one of the first companies to publicly say we were using it
● We were the first company to post a Go job
● It wasn’t even at a 1.0 release

40.
Performance
Performance has been stellar.
We still only run a few servers for each of our API clusters… after 4 years of growth!
Go has never been our bottleneck, it’s always something else (ie: database).

41.
Memory
No virtual machine - starts fast and small.
IronMQ starts up in 6.5MB of resident memory including configuration, making
connections, etc.
Four years in, we’ve never had a memory leak or problems related to memory.

42.
Reliability
Hard to quantify, but…
Our Go applications are very robust.
Rarely have a failure/crash that wasn’t related to some external problem.
Code tends to be cleaner and higher quality.
Strict compiler.
Do a lot with a small amount of code.

43.
Deployment
Go compiles into a single, static binary file.
Deployment is simply putting that file on a server and starting it up.
No dependencies required.
No runtime required.
Binary is small. (IronMQ is ~6MB)

44.
Rolling Back
Since it’s a single binary, you just stop the process and start the previous binary.
No need to worry about dependencies changing.

46.
Talent
When we first started, there were very few people that knew the language.
We didn’t know if we’d be able to hire anybody!
But people really want to work with Go.
The caliber of talent that want to work for Iron.io is amazing.

53.
Production Usage
4 years ago, nobody was using it in production (except maybe Google… and us).
Today, almost every startup I talk to is using it in some way or another.
And a lot of the big guys are using it now too.

61.
Conclusion
We took a risk and it paid off.
We love the language, and it’s loved us back.
Usage is growing super fast.
A lot of companies are already using it for critical parts of their production systems.

62.
Conclusion
2 years ago I wrote: “Is Go the next gen language we’ve been waiting for? It’s a bit too
early to say, but it’s certainly off to a good start.“
Today: Yes it is. Go IS the language for the cloud.
If you’re writing API’s or infrastructure, it should be at the top of your list.
Is Go the new Java? It’s a bit too early to say, but it’s certainly off to a good start.