News for hackers. Stuff that matters.
Re:The Uber Engineering Tech Stack, Part I: The Foundation by danpalmer on Sunday July 24, 2016 @09:33AM (#12153248)
All it takes is for one server in one datacenter to be slightly different, or perhaps you had a bugfix that needed to go out for users in one area, but you couldn't take the risk of a flaky deploy for the areas that didn't need it, now you've got a deploy that will be a lot more complicated or error-prone than a loop around deployment to one location.
Re:The Uber Engineering Tech Stack, Part I: The Foundation by brianwawok on Sunday July 24, 2016 @10:39AM (#12153428)
> All it takes is for one server in one datacenter to be slightly different

Don't do that. No one is allowed to ssh to boxes. If you need to enforce it by blowing up and rebuilding all servers once per week, do that.

> perhaps you had a bugfix that needed to go out for users in one area, but you couldn't take the risk of a flaky deploy for the areas that didn't need it

Feature flags. Default off, but flip on a new path of code for a set of users.

You should deploy so often that it is routine. Deploy 50 times a day. You will find bugs at first, but eventually you should get to the point that you could deploy for every single commit and no one would notice. (Now they may not be a good idea depending on your risk tolerance and other things, but you should be ABLE to deploy every single commit).

Not saying these are simple things to do, but if you are approaching servers with a devops mindsets, you literally should not care about number of servers or datacenters.

Re:The Uber Engineering Tech Stack, Part I: The Foundation by matwood on Sunday July 24, 2016 @11:08AM (#12153488)
> Don't do that. No one is allowed to ssh to boxes. If you need to enforce it by blowing up and rebuilding all servers once per week, do that.

Yep, this is change control 101. I used to have a boss who would go in and edit sprocs on the production server and never get them into source control. I finally just encrypted everything on the server so the only way to push out new code was to commit to source control. A sledge hammer yes, but sometimes it is required.

Use Terraform or some other tool to codify your entire infrastructure.

>You should deploy so often that it is routine. Deploy 50 times a day. You will find bugs at first, but eventually you should get to the point that you could deploy for every single commit and no one would notice. (Now they may not be a good idea depending on your risk tolerance and other things, but you should be ABLE to deploy every single commit).

This is a great point. At first it is terrifying, but then you realize that a deployment is so easy that bugs are generally not a big deal. Bugs happen, so the goal should be to shorten the time between bug found and fix deployed.

Re:The Uber Engineering Tech Stack, Part I: The Foundation by danpalmer on Sunday July 24, 2016 @01:03PM (#12153808)
> Don't do that. No one is allowed to ssh to boxes. If you need to enforce it by blowing up and rebuilding all servers once per week, do that.

I'd love to do that. I'd love to have no access to production servers, but ultimately that requires far more work to get right than Ansible configuring the same machines again and again. It also means you can't use dedicated hardware as easily, which restricts performance. It's a great situation to be in, but difficult to get to and requires a non-trivial amount of overhead.

At my place of work we deploy somewhere between 5 and 40 times on any given work day (on a team of 5 engineers). That's because we've managed to engineer a reliable and fast deployment process, but that took a long time to get right. It's powerful, but the overhead, particularly on a small team who are under pressure in a startup environment, can be quite large.

I'm not saying you're wrong, in terms of best practice I completely agree, but when the tradeoff is between sales/acquisition/product market fit/etc, and having a 'smooth' devops process, in many cases, the latter must come second.

Re:The Uber Engineering Tech Stack, Part I: The Foundation by brianwawok on Sunday July 24, 2016 @02:25PM (#12154171)
You can devops dedicated hardware. It's a little bit different but not that much. Heck there are boot2docker and such that let you just run docker on bare metal.
Re:The Uber Engineering Tech Stack, Part I: The Foundation by seanp2k2 on Monday July 25, 2016 @03:02AM (#12156981)
>docker >bare-metal

To some, no virtualization is still best.

Edit: you can still PXE boot immutable images.

Re:The Uber Engineering Tech Stack, Part I: The Foundation by brianwawok on Monday July 25, 2016 @08:16AM (#12158092)
I'm not sure boot2docker even has a virtualization level. Havent dug super far into it.
Re:The Uber Engineering Tech Stack, Part I: The Foundation by krinchan on Sunday July 24, 2016 @11:39AM (#12153575)
This is so weird. I hear this all the time. At my place of employment, we all have the ssh keys into our EC2 instances, but no one configures them. Ever. Period. Those ssh keys are purely for either validating changes in a test environment (like to .ebextensions) or diagnosing production issues (why did Puma fall over this time? why isn't syslog output making it to loggly?).

Of course, we lean heavily on Elastic Beanstalk; autoscaling regularly kills old instances daily since we scale from 2 to 18 and back to 2 instances in a 24 hour period across about 9 microservices.

So, if this ssh into boxes and change things is common, it means people aren't doing auto-scaling? THAT is scary.

Re:The Uber Engineering Tech Stack, Part I: The Foundation by brianwawok on Sunday July 24, 2016 @02:33PM (#12154213)
I'm very very pro devops. But I am cautious about auto scale.

It adds a lot of complexity. If your app has predprtable load it may simplify stuff a lot to not auto scale. Think a b2b app with manual account creation. You know your user levels. 0 reason to turn on auto scale.

Re:The Uber Engineering Tech Stack, Part I: The Foundation by krinchan on Monday July 25, 2016 @12:25AM (#12156459)
...so you run the servers you need for peak load 24/7? Ew. So much money just thrown away because "it's too complicated". We just scale based off of Network Out and only really spent a week finding the right threshold.
Re:The Uber Engineering Tech Stack, Part I: The Foundation by brianwawok on Monday July 25, 2016 @08:21AM (#12158123)
How long does your stack take to add a server. 3 minutes?

I have created a lot of services that couldn't have crappy perf for 3 minutes every time the load scales. Especially since in many apps the most expensive part is storage and dbs which cannot auto scale.

So say you spend 1k a month in your dbs and $100 for peak web load. You could spend a week fixing auto scaling bugs and try to save $25 by scaling web nodes down... But then you still have bad perf every time load spikes. I would not do that to save $25. I would question a company I work for that did that.

You need to be scaling up and down for hundreds of dollars per swing and have big spike loads before you add the complexity of auto scale.

Re:The Uber Engineering Tech Stack, Part I: The Foundation by krinchan on Tuesday July 26, 2016 @04:31PM (#12168538)
We're sensitive enough that we preemptively scale as traffic "appears" to be increasing. So we add 5 EC2 instances, not at crisis levels of traffic, but "Hmmm...I feel a tingling in my extremities". We then remove one instance at a time if traffic falls below "Not doing anything" levels. The time between scaling actions is 15 minutes. Since ASG's go to remove older instances first, we don't end up getting charged a full hour for instances that are up for less than an hour that often.

Admittedly, our web traffic is very US Business Hours centric and peaks predictably between 3 and 4 in the afternoon.

Also, we're operating more at a scale of $40,000/month for peak traffic capacity 24/7 and $25,000/month once I got autoscaling worked out. So...yeah. I guess the scale for savings matters. :-)

Re:The Uber Engineering Tech Stack, Part I: The Foundation by icebraining on Sunday July 24, 2016 @09:38AM (#12153258)
All it takes is for one server in one datacenter to be slightly different

But doesn't a global system still run on multiple DCs, at least for redundancy?

perhaps you had a bugfix that needed to go out for users in one area, but you couldn't take the risk of a flaky deploy for the areas that didn't need it

But if you have a single global system, you can't even make that decision.

To be clear, I'm not arguing against it, I'm just trying to understand why, since my first instinct would be to divide geographically as well.

Re:The Uber Engineering Tech Stack, Part I: The Foundation by danpalmer on Sunday July 24, 2016 @09:51AM (#12153295)
> But doesn't a global system still run on multiple DCs, at least for redundancy?

If you've got 2 levels of separation - servers and 'groups' (whether they are datacenters, or whatever) - you've got 2 levels at which that special casing needs to happen. If you only have 1 level - servers - i.e. one deployment, even if that's across multiple datacenters, you only have 1 place to special case. I'd say that's easier.

> But if you have a single global system, you can't even make that decision.

Good point, but my point was that it will be simpler and less error prone in general. You might not be able to push the bugfix, or you might have to risk the deploy globally, but I think either would be better in the long run for a simpler deployment. It is a trade-off though.