News for hackers. Stuff that matters.
Re:Ask HN: What stack would you use to build a CRUD web app ... by dmarlow on Saturday March 03, 2018 @03:39PM (#16511435)
In-memory cache: Redis.

Do you typically run Redis on the same host as your web server? Treating it as "in-memory" can have interesting side effects as you centralize it and introduce network delays.

Re:Ask HN: What stack would you use to build a CRUD web app ... by theli0nheart on Saturday March 03, 2018 @04:32PM (#16511702)
> Do you typically run Redis on the same host as your web server?

Yes, at least initially.

> Treating it as "in-memory" can have interesting side effects as you centralize it and introduce network delays.

I'd love to hear more about this!

Re:Ask HN: What stack would you use to build a CRUD web app ... by dmarlow on Friday March 16, 2018 @06:29PM (#16604443)
Sorry, totally missed this because there is no notification system here...

Let's say you have a large, tight loop in which Redis is used. If it's local, great, no problem. Now when it's centralized, you introduced a network delay you hadn't planned for. This "gotcha" comes up when you mess around with cache locality and didn't account for the delay changes in all areas of code.