Menu
Sign In Search Podcasts Charts People & Topics Add Podcast API Blog Pricing

Cian Butler

๐Ÿ‘ค Speaker
690 total appearances

Appearances Over Time

Podcast Appearances

Rust in Production
Cloudsmith with Cian Butler

It's part of the protocol that they can do that.

Rust in Production
Cloudsmith with Cian Butler

But for reasons that are very legacy and to do with how Go implemented its first HTTP client, they were accepting bodies.

Rust in Production
Cloudsmith with Cian Butler

They accepted 307s with content lengths that were not zero.

Rust in Production
Cloudsmith with Cian Butler

And because of that, they would have the Docker client for some reason used that first content length it saw as the content size of the image it was eventually going to be.

Rust in Production
Cloudsmith with Cian Butler

And so it would look at the response and say, cool, I have a content length of 200 megabytes.

Rust in Production
Cloudsmith with Cian Butler

Going to put that in the metadata for my eventual Docker image.

Rust in Production
Cloudsmith with Cian Butler

So it then follows the 307 and goes and grabs all the other layers and it says, and then it signs it and says, here you go, this is your built image.

Rust in Production
Cloudsmith with Cian Butler

The issue came in when we were getting...

Rust in Production
Cloudsmith with Cian Butler

So we're sending back this 307 saying it's got a content-like length of 200 megabytes, let's say.

Rust in Production
Cloudsmith with Cian Butler

The ALB we were using, the load balancer we were using, started to have errors on this.

Rust in Production
Cloudsmith with Cian Butler

It started saying, nope, that's an invalid request.

Rust in Production
Cloudsmith with Cian Butler

I don't remember exactly what error it started returning, but it started throwing random errors that were not the correct error as well.

Rust in Production
Cloudsmith with Cian Butler

it was processing something internally and it broke its serialization.

Rust in Production
Cloudsmith with Cian Butler

It's kind of scary when I kind of start saying it internally because these were SaaS products.

Rust in Production
Cloudsmith with Cian Butler

We didn't have proper logs for them.

Rust in Production
Cloudsmith with Cian Butler

We just had metrics of error rates going up and down.

Rust in Production
Cloudsmith with Cian Butler

So we sat down, started digging in, and we managed to map the error rates to the Docker requests.

Rust in Production
Cloudsmith with Cian Butler

we decided we needed to flip some, we needed to move some stuff around and try some stuff out.