ReadStore scale out

155 views
Skip to first unread message

Peter Hageus

unread,
Aug 17, 2021, 6:22:04 AM8/17/21
to ddd...@googlegroups.com
Hi. Just a quick technical question:

Does anyone have any do/don'ts regarding scaling out read stores, with multiple service instances? (For availability)

Our current solution has a local database per service instance. Great datalocality, availability etc, but downsides regarding cost, ops etc.

/Peter

Rickard Öberg

unread,
Aug 17, 2021, 7:17:59 AM8/17/21
to ddd...@googlegroups.com
Hi Peter,

This is such a great question I think. I can tell you how I did it (realvision.com), and how I feel about it after-the-fact.

The setup uses 3 EC2 servers (progressively larger as needs increased), each with our app, EventStore, and Neo4j Community running in-process. So cost wise the software is free. I put NGINX services in front (also on the same servers), and tried to ensure that the REST API (JSON:API + JSON Schema) returned caching headers appropriately, so that requests could be shortcut whenever possible by NGINX caches. And that’s about it.

We could add CloudFront caching in front of these core servers for the main read scale out, or add more NGINX servers. If you have a lot of requests that can’t be cached, due to per-user data or other reasons, then just scaling up this core cluster would work reasonably well. “It all depends” as the saying goes.

I’m pretty happy with it, would do the same again given the same system read/write characteristics. Really curious to see other answers to this one though, to get a feel for what approaches people have tried.

cheers, Rickard

> On 17 Aug 2021, at 18:22, Peter Hageus <peter....@gmail.com> wrote:
>
> Hi. Just a quick technical question:
>
> Does anyone have any do/don'ts regarding scaling out read stores, with multiple service instances? (For availability)
>
> Our current solution has a local database per service instance. Great datalocality, availability etc, but downsides regarding cost, ops etc.
>
> /Peter
>
> --
> You received this message because you are subscribed to the Google Groups "DDD/CQRS" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to dddcqrs+u...@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/msgid/dddcqrs/852CCF11-FC7F-433A-8E9B-0A248E0B180A%40gmail.com.
Reply all
Reply to author
Forward
0 new messages