Rootconf 2019

Rootconf 2019

On infrastructure security, DevOps and distributed systems.



Guruprasad GV


Patterns for designing stateful microservices at scale

Submitted Jan 13, 2019

Age old wisdom says - “make your services stateless”. There is a lot of merit in that.
While we strive to make our services stateless, have you considered the cost you are paying for this. In this session, we will challenge the norms, dive into use cases for making your microservice stateful, how does it impact user performance, cost, and fault tolerance. We will walk through scenarios that this starts to become enticing.


What is a microservice, and what is a stateful microservice?

Our Use case

  • A Game Server
  • Consistency Requirements
  • Scale Requirements
  • User Performance
  • Fault Tolerance

Event Sourced Pattern

Managing State

  • In Memory/ Off HeapSnapshot
  • External Snapshot
  • Dealing with failures
  • Managing State Sharding
  • Managing State Movement


  • Consistency Vs Availability
  • Building for Always On
  • Scaling

Building for Fault Tolerance

  • Minimize Blast Radius
  • Recovery aspects

Propagating State to downstream

  • Absolutes
  • Deltas
  • Change Logs
  • Batches
  • Consumer Options

Techs that might be well suited for this.

  • Actor Models
  • Erlang(?)


  • Why would you want to consider stateful microservices
  • Hard to manage but they can be done.
  • There are real-world benefits

Why would you consider

  • Other Use Cases.


Have a basic understanding of microservices, and undertand some challenges of operating them at scale.

Speaker bio

I am Architect at Moonfrog. In the last 14 years as an engineer, I have mostly been relishing solving technology challenges in various domains: compilers, client designs, distributed systems, big data systems etc. Now exploring technology in gaming at its best in Moonfrog for the past 1 year.



{{ gettext('Login to leave a comment') }}

{{ gettext('Post a comment…') }}
{{ gettext('New comment') }}
{{ formTitle }}

{{ errorMsg }}

{{ gettext('No comments posted yet') }}

Hybrid access (members only)

Hosted by

We care about site reliability, cloud costs, security and data privacy