r/programming • • Mar 01 '17

Programmers are confessing their coding sins to protest a broken job interview process. “Whiteboard” interviews are widely hated. They also discriminate against people who are already underrepresented in the field.

https://theoutline.com/post/1166/programmers-are-confessing-their-coding-sins-to-protest-a-broken-job-interview-process
1.0k Upvotes

717 comments sorted by

View all comments

Show parent comments

1

u/oridb Mar 03 '17 edited Mar 03 '17

More context is required. Is there a single pre-production environment that everyone in the same production environment rolls out to before rolling out to production?

In this case, it also wouldn't have shown up in a small pre-production environment, because the feedback loop was only a problem when the number of servers under the switches reached a critical number that overloaded the CPU and caused it to stop processing critical control packets with acceptable latencies.

When teams roll out to production, do all systems running their stuff update at the same time?

No, that would be incredibly dangerous. Staged rollouts are important. That's the only reason this issue was contained to only one data center, but without high pressure debugging it would be difficult to ensure that it was a bad roll and not (eg) a bug in handling leap seconds or some other situation that could spread out of control. It was also critical to quickly learn who was rolling out code that was having the spooky action at a distance effect.

On the other hand, I've also seen issues where the staged rollout was the root cause -- the new version interacted poorly with the old version, and caused relatively rare (but important) misrecorded data in production. An all at once rollout there might have saved some debugging.

When teams roll out to production, are the new changes all switched off by default only to be switched on post-rollout?

Yes. In this case, 0.5% rollout was enough to trigger cascading bugs.

"There are hundreds of teams running code on the layer below you, and many of them are doing releases." (i.e. what is a 'layer' in this context how is your layer and the layer below connected/communicating)?

I worked on the networking team at that time. Everything was communicating over our stuff.

1

u/AmalgamDragon Mar 03 '17 edited Mar 03 '17

In this case, it also wouldn't have shown up in a small pre-production environment, because the feedback loop was only a problem when the number of servers under the switches reached a critical number that overloaded the CPU and caused it to stop processing critical control packets with acceptable latencies.

It would if changes in network utilization were being monitored in the pre-production environment. By that I don't mean monitoring for loads above some threshold. I mean: is there more or less traffic and do the change meet expectations? Same goes for CPU, memory, local storage, and network storage utilization. Unexpected reductions in utilizations can indicative of a problem just a much as increases.

Given:

Yes. In this case, 0.5% rollout was enough to trigger cascading bugs.

It sounds like even a less than 100% pre-production rollout would have caused enough change in network traffic to be noticeable if it were being monitored.

but without high pressure debugging it would be difficult to ensure that it was a bad roll and not (eg) a bug in handling leap seconds or some other situation that could spread out of control. It was also critical to quickly learn who was rolling out code that was having the spooky action at a distance effect.

Setting up the system to automatically roll back in the case of any issues will tell you if the rollout is bad and the audit trails should be sufficient to identify who was the source of the rollout such that they can automatically notified of the issue their rollout caused and that it was rolled back. While it won't identify if there is an integration issue between the rollout that cause the issue to be apparent in the system, the diagnosis of the integration issue can occur at a non-high pressure pace while the system isn't offline.

1

u/oridb Mar 03 '17 edited Mar 03 '17

It would if changes in network utilization were being monitored in the pre-production environment.

No, the network utilization was actually very low. The thousands of packets per second (hundreds of kilobytes per second on a 40 gigabit link) just turned out to have high CPU load, and weren't properly deprioritized because of a vendor firmware bug interacting with a configuration mistake.

It sounds like even a less than 100% pre-production rollout would have caused enough change in network traffic to be noticeable if it were being monitored.

No, the network traffic difference was lost in the noise. Monitoring router queue length of critical vs noncritical control plane packets is what was needed (and the alerts on that were a big part of the hint that helped debug it), but that doesn't trigger until the CPU is overloaded. And I would be surprised if an applications team decided to monitor stats on backbone traffic and investigate it as part of their rollout. It's really not their job, nor do I think it should be.

There is absolutely testing and monitoring that could have caught this, including active probing for some of the issues that we ran into, (and it was put in place after the incident), but it's rather specific.

1

u/AmalgamDragon Mar 03 '17

As I said, CPU utilization also needs to be monitored. That generally applies to any resources the system has a limited supply (e.g. memory, local storage, network storage). It sounds like 'router queues' are a resource that needs monitoring in that specific system, and not just when the CPU is overloaded.

The monitoring I'm talking about isn't done by individual teams on just their own rollouts, but by the organization as a whole on the entire system. That way it isn't at the discretion of individual teams what gets monitored. That goes back to what I said about the organization being robust with respect to engineering.

There is absolutely testing and monitoring that could have caught this, including active probing for some of the issues that we ran into, (and it was put in place after the incident), but it's rather specific.

Indeed, there will be any number of system specific things that will need to be monitored, and doing so will require the organization to have disciplined engineering practices.

1

u/oridb Mar 03 '17

that specific system

"That specific system" is a generic data center network. With enough scale, strange interactions come up.

1

u/AmalgamDragon Mar 03 '17

Scale makes investing in good engineering all the more important, rather than being a reason not to do it. Distributed systems aren't unique in generating strange interactions. They occur on systems running on single machines too, and not catching them can screw up even more systems (i.e. millions) if they get deployed broadly through an auto-update.

1

u/oridb Mar 03 '17

Yes, those have other challenges. For example, Windows had an issue that some important this party program accessed invalid memory after some action, but due to allocation patterns, the bad access was harmless. They addressed it in a patch, but I am not sure how good engineering would find that one before shipping, without comprehensive tests of all actions in all third party programs, and what broken behavior needed to be accommodated.

1

u/AmalgamDragon Mar 03 '17

There are tools that can detect a process accessing invalid memory and lots of other defects that don't deterministcally show-up as obvious failures. Part of good engineering is including those tools into the development process.

1

u/oridb Mar 03 '17 edited Mar 03 '17

Third party code. Detecting the invalid memory accesses doesn't help, because Microsoft doesn't control the code and has no ability to ship a new version. The binary that someone else had shipped needed to keep working on Microsoft's platform, regardless of latent bugs. When Windows updates, Autocad (or whatever it was) needs to keep working.

1

u/AmalgamDragon Mar 03 '17

That's a strategic business decision, not an engineering failing on Microsoft's part. They don't put it hacks to keep most defective applications working, just certain ones that are strategic to their business. However, it is an engineering failing on the part of the third party. If they had been doing good engineering, no hacks would be need in the OS to keep their application running.

Microsoft actually used to dedicate significant resources to testing third-party application compatibility themselves, but a few years back they decided generally push off a lot of testing onto customers and significantly reduce their staff dedicated to testing. Put another way they've reduced their investment in doing good engineering, and it's no surprise there are consequences to that.

→ More replies (0)