Depending on your service, you can store state using:
- A relational database management system (RDBMS), such as MySQL or PostgreSQL
- A non-relational database management system, or NoSQL, such as MongoDB or RethinkDB
- An in-memory database (IMDB), such as Redis or Memcached
The first option is still the most commonly used one. You'll rely on stable and more than proven database systems that run in multiple systems and that you can find on any cloud service where you might want to deploy your microservice. Apart from the maturity of most solutions, a relational database, if properly set up, should give you consistency.
The second option is more recent compared to the first one. Usually, there are no fixed tables as in RDBMS, and ...