Efficient and reliable microservices
summary
Claims embedding Cassandra in the JVM and collocating a custom in‑memory store removes most marshalling, memcache and network RTT costs and yields much lower CPU and latency for a messenger workload that must handle ~100k reads / 8k writes/sec and ~0.5T messages (~100 TB). Implementation details: embed Cassandra in JVM nodes act as data owners with RF=3, use hinting/read‑repair/streaming, expose mutation listener callbacks to refresh in‑memory caches, use shared memory mmap for fast restart, hook Cassandra compaction to build Lucene indexes, and likes/messenger clusters run at hundreds of instances and work in production.
AI-written summary · about
chapters (34)
- 0:00Intro
- 0:48Messenger as an example
- 1:39Chat Messages: storage
- 2:00Chat Messages: full text search
- 2:12Chat Messages storage service
- 3:25Micro-service architecture
- 6:13Micro-services: costs
- 9:05Micro-services: lowering costs
- 10:10Stateful micro-services
- 11:52What can will go wrong?
- 13:59Failures
- 14:42Failure scenarios
- 15:55Downtime probabilities
- 18:38Embedding the Database
- 21:05Request routing
- 22:53Data partitioning
- 25:29Messenger: calling the DB
- 28:21Messages in-memory store:getMessages
- 29:17In-memory store: freshness
- 34:14Messages in-memory store: state loss
- 36:38In-memory store: optimizing normal restarts
- 37:47In-memory store: waiting for consistency
- 39:33In-memory store: summary
- 40:53getLastMessages( chats[])
- 42:25split & merge
- 43:57getLastMessages: local reads
- 45:24search, indexMessages: Full Text Search
- 47:50Compaction
- 49:23Longer deployments
- 51:13More DB nodes restarts
- 52:01Longer scaleout time
- 53:30Imbalanced resource utilization
- 55:46Diagnostics and support
- 57:34Stateful Services
related talks
59mEfficient reliable microservices
40mHow to Build Ultra-fast Java Microservices. Overcome Pitfalls of Data Persistence
53mLeveraging Caching For Cloud Native Applications
54mRethinking REST in a Microservices World
45mMigrating Mission Critical Workloads from Mainframe to Open...
41mBuilding blocks & how to use them: MongooseIM case study
35mCaching at Netflix: The Hidden Microservice
47mArchitectural Patterns for Caching Microservices
