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

But it's also not a perfect cache because some of our caches are in memory and some of them are memcache.

Rust in Production
Cloudsmith with Cian Butler

So things that were in memcache, those were quick.

Rust in Production
Cloudsmith with Cian Butler

But if it was in memory cache, unless you hit the exact same node again, that in memory cache is useless.

Rust in Production
Cloudsmith with Cian Butler

And like I said, we're running lots of replicas.

Rust in Production
Cloudsmith with Cian Butler

So there's no real guarantee on that performance.

Rust in Production
Cloudsmith with Cian Butler

Yeah, I'm a big believer that in-memory caches are only good when you can have a small footprint because they're effectively, they build up in that small footprint.

Rust in Production
Cloudsmith with Cian Butler

And if you need to have lots of replicas for whatever reason, be that like budgetary or a limiting of like only having one

Rust in Production
Cloudsmith with Cian Butler

CPU per map to a process or something like that, you end up with these very disparate caches of different information and your load kind of ends up going all over the place.

Rust in Production
Cloudsmith with Cian Butler

Yes, you would think that.

Rust in Production
Cloudsmith with Cian Butler

But the issue isn't that we were... It was...

Rust in Production
Cloudsmith with Cian Butler

it's not that we have one caching mechanism, it's that we have different caching mechanisms.

Rust in Production
Cloudsmith with Cian Butler

So we were using the Python caching library for in-memory cache.

Rust in Production
Cloudsmith with Cian Butler

And then we were using our memcache with our database to cache responses from the database.

Rust in Production
Cloudsmith with Cian Butler

So these are actually two different caches.

Rust in Production
Cloudsmith with Cian Butler

The memcache one is just...

Rust in Production
Cloudsmith with Cian Butler

could we stop ourselves from going to database?

Rust in Production
Cloudsmith with Cian Butler

And we would totally check that on every request.

Rust in Production
Cloudsmith with Cian Butler

So if we had done a very expensive DB query, it should be in that memcache.

Rust in Production
Cloudsmith with Cian Butler

So on the retry, it would come from the memcache.

Rust in Production
Cloudsmith with Cian Butler

What wasn't being cached were those pure functions we were running inside the monolith that were in the Python cache.