logoalt Hacker News

We put a Redis server inside our runtime

30 pointsby eandrelast Wednesday at 10:11 AM10 commentsview on HN

Comments

sudowood0yesterday at 11:23 PM

> 25,000 lines of Rust

I'd really like to understand why they didn't just also have a small container for this running. The only reasoning given in the article is "another container to run and manage" which Docker compose, TestContainers, etc will make trivial.

If a dev came to me and suggested we go this route I would need to seriously be convinced. They even explicitly call out this is only for local development meaning it's not like this was piggy-backing off of a secondary need for a Rust redis anyways. Insanity.

show 2 replies
drdexebtjltoday at 2:54 AM

> Tests exercise a real Redis server rather than a mock, so the command behavior a test depends on is the behavior it will meet in production.

No, they don’t. They exercise an alternative in-process implementation that is supposed to behave like a real Redis, but will not.

> In production Encore provisions a real, managed Redis, because the embedded server is a development fixture and is not built to scale.

Ah! So you do see how it does not behave identically to a real Redis.

This sounds like a terrible idea. Now they’re stuck forever maintaining an alternative Redis implementation, and it isn’t even useful in production.

iwantiteztoday at 2:51 AM

  const cache = {}
Look I made a redis server
sshineyesterday at 11:32 PM

Rewriting Redis in Rust sounds genuinely useful when you want to rely on it as a library.

Maintaining byte-for-byte parity with newer versions of Redis sounds like being in debt; why not rely on your fork instead?

khursyesterday at 11:55 PM

If you look at what CloudFlare did - when they were unhappy with Nginx, they re-wrote their own proxy in Rust, one wonders if this company could instead have 'porting' reddit, started afresh?

Reddit is from 2009 so must have lots of technical debt over the years? and could have been an opportunity to start afresh? They may have have ended up with a better product!!

show 1 reply
Ozzie-Dtoday at 1:22 AM

[flagged]