News for hackers. Stuff that matters.
Re:Docker not ready for primetime by bphogan on Sunday August 28, 2016 @03:25PM (#12378054)
woah, wait.....

It "geneerally works if" you " rebuild docker hosts on a daily or more frequent basis."

Perhaps I'm misunderstanding, but needing to rebuild my prod env several times a day seems pretty "not ready for prime time" to me.

That's like when we'd say that Rails ran great in production in 2005, as long as you had a cron task to bounce fastCGI processes every hour or so.

So, can you elaborate on why rebuilding the containers is good advice?

Re:Docker not ready for primetime by jacques_chester on Sunday August 28, 2016 @03:41PM (#12378131)
The security exec at Pivotal, where I work, has been talking about "repaving" servers as a security tactic (along with rotating keys and repairing vulnerabilities).[0]

The theory runs that attackers need time to accrue and compound their incomplete positions into a successful compromise.

But if you keep patching continuously, attackers have fewer vulnerabilities to work with. If you keep rotating keys frequently, the keys they do capture become useless in short order. And if you rebuild the servers frequently, any system they've taken control of simply vanishes and they have to start from scratch.

I'm not completely sold on the difference between repair and repave, myself. And I expect that sophisticated attackers will begin to rely more on identifying local holes and quickly encoding those in automated tools so that they can re-establish their positions after a repaving happens.

But it raises the cost for casual attackers, which is still worthy.

[0] https://medium.com/built-to-adapt/the-three-r-s-of-enterpris...

Re:Docker not ready for primetime by tptacek on Sunday August 28, 2016 @04:08PM (#12378265)
Having everything patched as soon as patches are available (or within, say, 6 hours of availability, for "routine" patches, with better responsiveness for critical patches) is a win.

The rest: not so much.

Rebuilding continuously for security is not something I would recommend.

Re:Docker not ready for primetime by jacques_chester on Sunday August 28, 2016 @04:10PM (#12378277)
> Rebuilding continuously for security is not something I would recommend.

So that I understand, could you elaborate?

Particularly, do you mean "not recommend" as in "recommend against" or "not worth the bother"?

Re:Docker not ready for primetime by tptacek on Sunday August 28, 2016 @04:20PM (#12378327)
It's not worth the bother. Apart from keeping patches up today --- which is a good idea --- it's probably not really buying you anything.

It's not crazy to periodically rotate keys, but attackers don't acquire keys by, you know, stumbling over them on the street or picking them up when you've accidentally left them on the bar. They get them because you have a vulnerability --- usually in your own code or configuration. Rebuilding will regenerate those kinds of vulnerabilities. Attackers will reinfect in seconds.

Re:Docker not ready for primetime by lawnchair_larry on Monday August 29, 2016 @04:35PM (#12385086)
A lot of companies do lose their keys that way. www roots, gists, hardcoded in products, github history, etc.

The win to rotating them is not so much because you'll be regularly evicting attackers you didn't know had your keys, but because when you do have a fire, you won't be finding out for the first time that you can't actually rotate them.

It also forces you to design things much more reliably which helps continuity in non-security scenarios.

After redeploying and realizing that Todd has to ssh in and hand edit that one hostname and fix a symlink that was supposed to be temporary so the new version of A can talk to B, that's going to get rolled in pretty quickly. Large operations not doing this tend to quickly end up in the "nobody is allowed to touch this pile of technical debt because we don't know how to re-create it anymore" problem.

Re:Docker not ready for primetime by tkiley on Sunday August 28, 2016 @04:56PM (#12378492)
It seems like it's good to be able to rebuild everything at a moment's notice after patching against a major exploit, though. You should have a fast way to rebuild secrets and servers after the next heartbleed-scale vulnerability.
Re:Docker not ready for primetime by tptacek on Sunday August 28, 2016 @05:05PM (#12378532)
Being able to rebuild critical infrastructure from source, and know that you'll be able to reliably deploy it, is a _huge_ win for security.

After a bunch of harrowing experiences with clients, I'm pretty close to believing "using packages for critical infrastructure is a bad idea".

Re:Docker not ready for primetime by helloiamaperson on Sunday August 28, 2016 @07:03PM (#12378964)
Being able to rebuild critical infrastructure from source, and know that you'll be able to reliably deploy it, is a _huge_ win for security.

In that case, you might be interested in bosh: http://bosh.io/docs/problems.html (the tool that enables the workflow jacques_chester was describing). It embraces the idea of reliably building from source for the exact reasons you've mentioned.

Re:Docker not ready for primetime by Gigablah on Monday August 29, 2016 @12:04AM (#12379943)
I'm confused now, earlier you recommended patches over rebuilding continuously from source, but this seems like the opposite?
Re:Docker not ready for primetime by Noumenon72 on Sunday August 28, 2016 @10:16PM (#12379574)
What does "packages" mean here? Sorry.
Re:Docker not ready for primetime by edmccard on Monday August 29, 2016 @01:26AM (#12380180)
My guess is that "packages" is shorthand for "binary packages", as opposed to being able to redeploy from source.
Re:Docker not ready for primetime by tptacek on Monday August 29, 2016 @01:07PM (#12383312)
Nod.
Re:Docker not ready for primetime by Gigablah on Monday August 29, 2016 @12:01AM (#12379939)
I'm guessing they meant to write "patches".
Re:Docker not ready for primetime by jacques_chester on Sunday August 28, 2016 @04:27PM (#12378358)
That was my hunch too. Thanks. I'll ask more about whether I missed something on the other side of the argument.
Re:Docker not ready for primetime by StreamBright on Sunday August 28, 2016 @04:16PM (#12378313)
Depends, usually you have to be able to re-build your prod infra within minutes or maximum hours, otherwise you are doing devops wrong. The whole point of automation is reproducible infrastructure that you can stand up quickly. With stateless approach you can just do this. Why would you do that? Imagine an outage in one of the 3 datacenters you are running your infra in the same region. You need to move 1/3 of the capacity to the remaining 2 datacenters. This is not too much different to re-building it.
Re:Docker not ready for primetime by falcolas on Sunday August 28, 2016 @07:26PM (#12379049)
Aaah, the classing "you're doing <it> wrong" argument. I can come up with dozens of different environments where it is simply not feasable to rebuild an environment within two hours.

- Any infrastructure with lots of data. Data just takes time to move; backups take time to restore.

- You're on bare metal because running node on VMs isn't fast enough.

- You're in a secure environment, where the plain old bureaucracy will get in the way of a full rebuild.

- Anytime you have to change DNS. That's going to take days to get everything failed over.

- Clients (or vendors) whitelist IPs, and you have to work through with them to fix the IPs.

- Amazon gives you the dreaded "we don't have capacity to start your requested instance; give us a few hours to spin up more capacity"

> Imagine an outage in one of the 3 datacenters you are running your infra in the same region. You need to move 1/3 of the capacity to the remaining 2 datacenters.

Oh, this is very different. If your provider loses a datacenter, and your existing infrastructure can't handle it, you're already SOL - the APIs for spinning up instances and networking is going to be DDOSed to death by all of the various users.

Basic HA dictates that you provision enough spare capacity that a DC (AZ) can go down and you can still serve all of your customers.

Re:Docker not ready for primetime by StreamBright on Monday August 29, 2016 @03:24AM (#12380546)
I mostly disagree with your points, with the exception of the last one.

I used to work in the team that runs Amazon.com. All of the systems serving the site can be re-built within hours and nothing can serve the site that cannot be rebuilt within a very thing SLA. However, I understand that not all the companies have this requirement. This feature is only relevant when a site downtime hurting the company too much, so it could not be allowed.

Reflecting to your points:

- Lots of data -> use S3 with de-normalized data, or something similar

- Running a VM has 3% overhead in 2016, scalability is much more important than a single node performance

- High security environments are usually payment processing systems, downtime there can be a bit more tolerated, delaying transactions is ok

- Amazon uses DNS for everything, even for datacenter moves. It is usually done within 5 minutes

- This is a networking challenge, using something like EIP (where the public facing IP can be attached to different nodes) makes this a non-issue

- Amazon has an SLA, they extremely rarely have a full region outage, so you can juggle capacity around

Losing a dc out of 3 does not require work because you can't handle the load, it is required to have the same properties (same extra capacity for example) just like before. Spinning up instances should not DDOS anything, it is with constant load on the supporting infrastructure.

The last point I agree with.

Re:Docker not ready for primetime by falcolas on Monday August 29, 2016 @09:42AM (#12381759)
First, two important assumption I'm making when I say this (and I feel they are reasonable assumptions). I'm not just talking about bringing a production environment back up in the same or adjacent AZ; I'm talking about true DR, where you're moving regions. I'm also not limiting my discussion to AWS' infrastructure - not with Google, Rackspace, Cloudflare and others in the space as well.

> Lots of data -> use S3 with de-normalized data, or something similar

S3's use case does not match up with many different computing models (hadoop clusters, database tables, state overflowing memory), and moving data within S3 between regions is painful. Also, not all cloud providers have S3.

> Running a VM has 3% overhead in 2016, scalability is much more important than a single node performance

Not when you have a requirement to respond to _all_ requests in under 50ms (such as with an ad broker).

> High security environments are usually payment processing systems

Or HIPPA, or government.

> delaying transactions is ok

Not really. When I worked for Amazon, they were still valuing one second of downtime at around $13k in lost sales. I can't imagine this has gone down.

> Amazon uses DNS for everything, even for datacenter moves. It is usually done within 5 minutes

Amazon also implements their own DNS servers, with some dynamic lookup logic; they are an outlier. Fighting against TTL across the world is a real problem for DR type scenarios.

> EIP (where the public facing IP can be attached to different nodes) makes this a non-issue

EIPs are not only AWS specific, but they can not traverse across regions, and rely on AWS' api being up. This is not historically always the case.

> they extremely rarely have a full region outage, so you can juggle capacity around

Not always. Sometimes, you can. But not always. Some good examples from the past - anytime EBS had issues in us-east-1, the AWS API would be unavailable. When an AZ in us-east-1 went down, the API was overwhelmed and unresponsive for hours afterwards.

> Spinning up instances should not DDOS anything, it is with constant load on the supporting infrastructure.

See above. There's nothing constant about the load when there is an AWS outage; everyone is scrambling to use the APIs to get their sites backup. There's even advice to not depend on ASGs for DR, for the very same reason.

AWS is constantly getting better about this, but they are not the only VPS provider, nor are they themselves immune to outages and downtime which requires DR plans.

Re:Docker not ready for primetime by alrs on Sunday August 28, 2016 @08:12PM (#12379214)
"Any infrastructure with lots of data. Data just takes time to move; backups take time to restore."

Exactly. Don't put data in Docker. Files go in an object store, databases need to go somewhere else.

Re:Docker not ready for primetime by vacri on Sunday August 28, 2016 @11:55PM (#12379916)
> Any infrastructure with lots of data.

OP's first point is 'don't put data in docker'. Docker is not for your data. But more to the point, if you're rebuilding your data store a couple of times every day, a couple of hours downtime isn't going to be feasible.

> You're on bare metal because running node on VMs isn't fast enough

In such a situation, you should be able to image bare metal faster than 2 hours. DD a base image, run a config manager over it, and you should be done. Small shops that rarely bring up new infra wouldn't need this, but anyone running 'bare metal to scale' should.

> bureaucracy

Isn't part of the infra rebuild per se.

> Anytime you have to change DNS. That's going to take days

Depends on your DNS timeouts, but this is config, not infra. Even if it is infra, 48-hour DNS entries aren't a best-practice anymore (and if you're on AWS, most things default to a 5 min timeout)

> Clients (or vendors) whitelist IPs, and you have to work through with them to fix the IPs

I'd file this under 'bureaucracy' - it's part of your config, not part of your prod infra (which the GP was talking about).

> Amazon gives you the dreaded...

Well, yes, but this is on the same order as "what if there's a power outage at the datacentre". Every single deploy plan out there has an unknown-length outage if the 'upstream' dependencies aren't working. "What if there's a hostage event at our NOC?" blah blah.

The point is that with upstream working as normal, you should be able to cover the common SPOFs and get your prod components up in a relatively short time.

Re:Docker not ready for primetime by falcolas on Monday August 29, 2016 @09:57AM (#12381860)
> OP's first point is 'don't put data in docker'. Docker is not for your data.

I agree, but I (and the GP, from my reading) was not speaking about only Docker infrastructure.

> Isn't part of the infra rebuild per se.

I can see your point, and perhaps these points don't belong in a discussion purely about rebuilding instances discussion. That said, I have a very hard time focusing just on the time it takes to rebuilding capacity when discussing a DC going down; there's just too many other considerations that someone in Operations must consider.

When I have my operations hat on, I consider a DC going down to be a disaster. Even if the company has followed my advice and the customers do not notice anything, we're now at a point where any other single failure will take the site down. It's imperative to get everything taken down with that DC back up; and it's going to take more than an hour or two.

Re:Docker not ready for primetime by cortesoft on Sunday August 28, 2016 @04:33PM (#12378391)
I know you probably aren't trying to address all cases, but just because you can't re-build your prod infrastructure in minutes or hours doesn't mean you aren't doing devops right.

Many larger companies can't do this; my company has 70+ datacenters with tens of thousands of servers. We can't re-build our prod infra in minutes or hours. We are still doing devops right :D

Like I said, I know you aren't talking about my situation when you made your statement... I just get frustrated when people act like there are hard and fast rules for everyone.

Re:Docker not ready for primetime by StreamBright on Sunday August 28, 2016 @04:51PM (#12378468)
Well I am not talking about a 1M node outage. That you cannot fix with anything. I am talking about a maximum datacenter wide outage, that actually happens pretty often. Amazon has game days, Netflix has chaos monkeys for the same reason. Make sure that you can rebuild parts of your infra pretty quick.
Re:Docker not ready for primetime by toomuchtodo on Sunday August 28, 2016 @06:13PM (#12378793)
As long as your VMs are prebaked and your cloud provider supports ASG-esq primatives (i.e. "I need X instances running at a time, instantiate with such and such meta data") anyone can rebuild their prod infra quickly. You don't need Docker or containers to do that.
Re:Docker not ready for primetime by cortesoft on Sunday August 28, 2016 @07:25PM (#12379046)
Some of us work for those cloud providers :)
Re:Docker not ready for primetime by toomuchtodo on Sunday August 28, 2016 @08:12PM (#12379213)
I have no doubt ;) it's why I always strive for accuracy here!
Re:Docker not ready for primetime by cortesoft on Sunday August 28, 2016 @06:01PM (#12378750)
Oh, of course. Our datacenters often go offline (both planned and unplanned), and we are always ready to handle that. We are pretty much constantly re-provisioning servers... with so many physical machines, hard drive and other hardware failures are a daily occurrence.
Re:Docker not ready for primetime by ckdarby on Sunday August 28, 2016 @06:41PM (#12378884)
I'm going to have to call bullshit, Where do you work or what company do you own?

I work at MindGeek, depending on the time of the year it would be fair to say we rank within the top 25 bandwidth users in the world. We are not even close to that amount of servers and we deal with some of the largest traffic in the world. What company is running in 70+ datacenters!? World's largest VPN provider? Security company providing all the data to the NSA?

Maybe it is just my broad assumptions but I would hope that the major big 10 that come to mind such as Google, Amazon, Microsoft, etc would be able to rebuild their production regions in hours.

Re:Docker not ready for primetime by Sanddancer on Sunday August 28, 2016 @06:52PM (#12378923)
Not the OP, but first thing that comes to mind as to why you'd need a lot of datacenters are CDNs like Cloudflare or Akamai. Stuff like that, you need lots of servers, lots of storage, and low latency. You'd also need a good amount of configurations because things like video streaming would require different server settings than, say, protecting a site that's being DDOSed.
Re:Docker not ready for primetime by cortesoft on Sunday August 28, 2016 @07:24PM (#12379038)
Ding ding ding :D

I don't work for one of those two, but I do work for a very large CDN.

Re:Docker not ready for primetime by ceejayoz on Sunday August 28, 2016 @10:04PM (#12379536)
> I work at MindGeek, depending on the time of the year it would be fair to say we rank within the top 25 bandwidth users in the world.

"I'd have thought I've had heard of them..."

One Wiki search later... yup. I've heard of them.

Re:Docker not ready for primetime by Steeeve on Monday August 29, 2016 @04:00AM (#12380642)
Ha! I went to their website... Hmm... never heard of them. Went to Wikipedia... Oh, now I know who they are! Yeah. Lot's of bandwidth.
Re:Docker not ready for primetime by fnord123 on Monday August 29, 2016 @04:04AM (#12380650)
>What company is running in 70+ datacenters!?

People running edge networks and therefore need servers local to everywhere in the world to keep latencies down. Maybe it's not as much of an issue for MindGeek (the parent company for a lot of video streaming sites). I would guess you guys need a lot of throughput but latency isn't so much of a problem. Or you simply don't need to serve some parts of the world where it might be illegal to distribute some types of content.

FWIW, Cloudflare has 86 data centers: https://www.cloudflare.com/network-map/

Re:Docker not ready for primetime by cortesoft on Monday August 29, 2016 @12:23PM (#12382972)
Or they are customers of CDNs.
Re:Docker not ready for primetime by user5994461 on Monday August 29, 2016 @04:35PM (#12385084)
[Note: MindGeek = the pornhub network]

Short version: That's a video streaming websites which is rather simple, yet bandwidth intensive.

Outsourcing the caching and video delivery means MindGeek can do with little servers and a few locations.

Nonetheless the CDN you're outsourcing to does need a lot of servers at many edge locations.

Actually, if we think in terms of "top bandwith users in the world". It's possible that your company is far from being in the list. It's likely dominated by content delivery / ISP / and other providers, most of which are unknown to the public.

Re:Docker not ready for primetime by ckdarby on Friday September 02, 2016 @09:16PM (#12417238)
Would you say Netflix & Youtube are rather simple? Handling +100 million users is never rather simple...
Re:Docker not ready for primetime by user5994461 on Saturday September 03, 2016 @07:02AM (#12418723)
Youtube had the challenge of being one of the first streaming services, and it's operating at an unprecedented scale. I am actually wondering, how many orders of magnitude youtube has more traffic than pornhub?

I am in distributed systems and try to work exclusively on hard problems. So when I say "simple", that is biased on the high end of the spectrum.

If you go to pornhub.com and looks at "popular keyword", you'll only find thousand or ten thousands videos. In a way, there is not that much content on pornhub.

All major websites have challenge. Pornhub is a single purpose website and a lot of the challenge is in video delivery, which can be outsourced to a CDN nowadays.

"simple" is maybe too strong a word. I am trying to convey the idea that it has limited scope and [some of] the problems it's facing are understood by now and have [decent] solutions.

That's not to say it's easy ;)

Re:Docker not ready for primetime by cortesoft on Sunday August 28, 2016 @07:23PM (#12379029)
I work for a large CDN.
Re:Docker not ready for primetime by cerebellum42 on Sunday August 28, 2016 @04:48PM (#12378453)
I think the point of the comment you're replying to is not really what you are replying to. Having the ability to rebuild quickly and frequently is great, and something you should aim for, but actually being forced to do it regularly whether you need it or not is pretty bad.

Edit: didn't notice someone else had already said this, opened this tab like 15 minutes ago

Re:Docker not ready for primetime by StreamBright on Sunday August 28, 2016 @04:50PM (#12378462)
I see your point. The source of force that makes you do it should not come from Docker I agree. :) We are just lucky that we can do it when it happens.
Re:Docker not ready for primetime by raverbashing on Sunday August 28, 2016 @04:32PM (#12378387)
"have to be able" is very different from "have to"

Sure, you want to be able to deploy quickly. But if there's no reason to, then don't.

And I would be very scared if Docker images had a 1 day uptime max

Re:Docker not ready for primetime by marcosdumay on Sunday August 28, 2016 @05:29PM (#12378646)
Can != should
Re:Docker not ready for primetime by siliconc0w on Sunday August 28, 2016 @03:54PM (#12378198)
We see a couple of different bugs that are best solved by simply rebuilding the container host. To docker's credit these tend to decrease with high versions.

We also see them mostly in non-prod environments where we have greater container/image churn. We use AWS autoscale and Fleet so containers just get moved to other hosts when we terminate them. We have actually thought about scheduling a logan's run type job that kills older hosts automatically - it's in the backlog.

Re:Docker not ready for primetime by majewsky on Monday August 29, 2016 @05:30AM (#12380874)
Bugs that can be solved by a rebuild are not restricted to Docker. We had an interesting week when the build was red all the time for various reasons, and then prod started failing. Usually we deploy once a day, and not deploying for a week caused several small memory leaks to turn into big ones.
Re:Docker not ready for primetime by nolok on Sunday August 28, 2016 @03:52PM (#12378192)
> So, can you elaborate on why rebuilding the containers is good advice?

While I sincerely hope I'm wrong, I assume it's because you reset the clock on the probability something goes very wrong.

Re:Docker not ready for primetime by sp527 on Sunday August 28, 2016 @03:57PM (#12378214)
The "have you tried turning it off and on again" of DevOps. It makes a surprising amount of sense though, as long as your service is truly stateless, the restart can be easily orchestrated, and it results in no difference in operational costs.
Re:Docker not ready for primetime by creshal on Sunday August 28, 2016 @04:29PM (#12378371)
If it's stateless, then why does rebuilding it change anything about the frequency of bugs popping up?
Re:Docker not ready for primetime by XorNot on Sunday August 28, 2016 @06:02PM (#12378753)
Ooh I can answer this one: because ask people if their container root is writeable, and get amused at the blank stares you get back.

I am currently fighting an ongoing battle at work to point out that the plans for our Mesos cluster have not factored in that the first outage we have will be when someone fills up the 100gb OS SSD because no one's given any thought to where the ephemeral container data goes.

Re:Docker not ready for primetime by piaste on Monday August 29, 2016 @05:58AM (#12380962)
I am a layman to devops. By "ephemeral container data" do you mean temporary files created by the service, temporary files created by the OS / other applications, or something else?
Re:Docker not ready for primetime by kbar13 on Sunday August 28, 2016 @05:02PM (#12378520)
if both the code and the infra it's running on is stateless, then yeah.
Re:Docker not ready for primetime by creshal on Monday August 29, 2016 @04:31AM (#12380727)
So we're replacing somewhat not fully stable VMs running on somewhat not fully stable virtualization infrastructure with theoretically stable containers running on violently unstable container infrastructure?
Re:Docker not ready for primetime by tristor on Monday August 29, 2016 @07:54AM (#12381269)
Pretty much, yes.
Re:Docker not ready for primetime by pmarreck on Sunday August 28, 2016 @04:40PM (#12378419)
Mutability is the root of all computing evils
Re:Docker not ready for primetime by andrewprock on Sunday August 28, 2016 @11:34PM (#12379849)
And the source of all computing value.
Re:Docker not ready for primetime by jjn2009 on Sunday August 28, 2016 @03:35PM (#12378100)
The host isn't the container itself. They want to re-provision the host likely not because of something wrong with the application but instead docker is in some state which is non-recoverable, or at least not recoverable by automatic means.
Re:Docker not ready for primetime by benologist on Sunday August 28, 2016 @03:59PM (#12378222)
Because then you always know you can always rebuild automatically and that's being tested constantly while developers work, a bit like how Netflix crashes everything all the time randomly to ensure they can always automatically recover from every dependency.

It also naturally rewards optimizing around time-to-redeploy, probably a lot of benefits there.