Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

How did you manage horizontal scaling with this approach?


If you need total system order then that will always be your bottleneck, although you can make it very fast by scoping it to just a sequence number generator and doing the actual work in separate processes.

Otherwise, most event sourcing uses different "streams" of events for different application functions, so you can shard by stream in whatever way works for you.


You could shard based on uuid, so that each shard has its set of objects that it manages.

The easiest way would be to cast uuid as a 64bit unsigned int, then mod by the number of shards. If the number of shards is dynamic, then use consistent hashing.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: