News for hackers. Stuff that matters.
Re:How Dark Deploys Code in 50ms by z3t4 on Thursday July 11, 2019 @04:28AM (#20410003)
Syntax errors are the easiest errors to fix and almost never get into production.

Zero downtime deployments are very rare, and ads a lot of complexity, so it's a big trade-off, compared to just uploading the new code and restarting the service. And having the front-end deal with minor hiccups like service restarts, because users will have such issues all the time due to being on mobile networks, trains going through tunnels etc.

You can do as much testing as you want, both manually and automatically, but you still can't detect all issues as efficient as thousands of users in production. So just accept that there will be issues, and instead design your pipeline so that those issues can be fixed within minutes.

Re:How Dark Deploys Code in 50ms by snypox on Thursday July 11, 2019 @06:27AM (#20410465)
> Zero downtime deployments are very rare

What do you mean? Rolling deployments are a very basic feature of container orchestrators.

Re:How Dark Deploys Code in 50ms by namelosw on Thursday July 11, 2019 @10:41AM (#20411855)
I don't know what he refers to. But there is a specific kind of zero downtime deployments which can restart without losing in-memory state, like Erlang.

Erlang also provides "fix in minutes, in production" stories he refers. For most of languages, it's very hard to remotely get access to an object, let alone fix things directly.

With Erlang, you can inspect every object in the cluster to understand what's going on for any user, and fix the plane in the mid-air instead of rebuilding a plane with the same issue, then go through the process to fix it.

Re:How Dark Deploys Code in 50ms by nijave on Thursday July 11, 2019 @06:53AM (#20410582)
You don't even need containers--it's a feature of load balancers containers rely on. Start new container, wait for it to become healthy, add it to the load balancer, remove old container (with an optional, let connections to old container close first)
Re:How Dark Deploys Code in 50ms by PunchTornado on Thursday July 11, 2019 @09:02AM (#20411153)
what if it involves db updates?
Re:How Dark Deploys Code in 50ms by sethammons on Thursday July 11, 2019 @09:24AM (#20411306)
We have run a lot of db changes. It requires multiple steps. Add a column, migrate data, update code to use new column and old column, update code to use only the new column, update table to drop old column. Similar for migrating to new dbs, tables, etc. It is rare for us to need to disable writes for a version bump or something.
Re:How Dark Deploys Code in 50ms by rblatz on Thursday July 11, 2019 @09:22AM (#20411291)
Where I work we had that same thought. Until we stopped doing breaking database changes.
Re:How Dark Deploys Code in 50ms by z3t4 on Thursday July 11, 2019 @07:19AM (#20410677)
If you aim for zero downtime there will be a point where the complexity work against you. for example: load balancer goes down, corrupted state due to two different versions running simultaneous, a bottleneck causing congestion, etc.

My favorite "load balancing" for web-pages is using "DNS round robin" where you add several A records, and the browser automatically try another IP if the request fails.

Re:How Dark Deploys Code in 50ms by nicolaslem on Thursday July 11, 2019 @08:05AM (#20410861)
> ...the browser automatically try another IP if the request fails.

The browser tries another IP if it cannot connect to the first one.

If a server throws 500s left and right DSN RR won't help, whereas a load balancer would remove the offending server from the pool.

Re:How Dark Deploys Code in 50ms by sneak on Thursday July 11, 2019 @10:35AM (#20411801)
The browser does not try another IP if the request fails; it tries the first one only (the DNS server chooses a random order for the response), unless browsers have changed their behavior recently.

DNS round robin is not failover. If one of your four A records points to a dead box, 25% of your customers are SOL.

Re:How Dark Deploys Code in 50ms by duncaen on Thursday July 11, 2019 @05:32PM (#20416067)
https://en.wikipedia.org/wiki/Happy_Eyeballs

Browsers even try other IPs and alternate between IPv4 and IPv6 before the connection is established.

Re:How Dark Deploys Code in 50ms by sneak on Thursday July 11, 2019 @06:17PM (#20416409)
I know all about this, but most websites only support v4, and I don’t think this is used in any way for choosing which A record to use.
Re:How Dark Deploys Code in 50ms by duncaen on Friday July 12, 2019 @11:30AM (#20421426)
Most websites don't have redundant servers but its still there and used by a lot of big sites.

The whole point of it is to connect to multiple A and AAAA records with a very short delay (250ms in chrome). The browsers use poll to get notified about the first established connection and then use it. So if one A/AAAA records IP is unreachable or slow it will use a another one. There will be no fallout (except maybe for clients that don't use something like happy eyeballs, but any browser does that) if you have multiple A/AAAA records and one of them is down.

Re:How Dark Deploys Code in 50ms by z3t4 on Thursday July 11, 2019 @02:10PM (#20413891)
Its supported in IE, Chrome and Firefox, havent tried Safari and others. They will wait until timeout, then try the next IP. IE will give up if the second IP is down, while Firefox and Chrome will try many IPs
Re:How Dark Deploys Code in 50ms by SteveNuts on Thursday July 11, 2019 @08:27AM (#20410972)
DNS round robin provides redundancy, not load balancing (though it ipso facto does somewhat evenly distribute requests). You really need an application aware load balancer that can detect http status codes and route around failures at the very least.
Re:How Dark Deploys Code in 50ms by vimslayer on Thursday July 11, 2019 @09:40AM (#20411401)
Zero downtime deployments is not the same as zero downtime generally ever.

We deploy to production several times a day. We have an in-house product that our own emplyees use and they absolutely love that they can ask a feature in the morning and get it in a few hours (in best case scenario). That wouldn't be at all feasible if all those deployments caused errors to users. Luckily that's not a problem, because these days it's really easy to get zero downtime deployments with all this containers and "serverless" functions and whatnot.

Re:How Dark Deploys Code in 50ms by quickthrower2 on Thursday July 11, 2019 @06:20AM (#20410436)
> You can do as much testing as you want

With what Dark is promising, I believe testing would be easier. Deploy to a test environment in 50ms. Then run a suite of tests, then deploy to production in 50ms.

There could be some complementary tech that figures out what tests need to be run based on what you change to get the time down.

Re:How Dark Deploys Code in 50ms by heavenlyblue on Thursday July 11, 2019 @06:47AM (#20410544)
They're kind of lying.

You only need pip or any package install if your testing image doesn't pre-install the required packages before running the tests. Which I don't myself since I always want to see if my packages work with the latest versions of other packages - and Dark wouldn't be able to handle that anyway.

So my test runs actually complete in about 50 ms if I'm not testing any external API functionality. They will also never finish earlier than 5 minutes if I am, even on Dark - since they're based on external services.