6.24 HTTP Sessions

By default Micronaut is a stateless HTTP server, however depending on your application requirements you may need the notion of HTTP sessions.

Micronaut comes with a session module inspired by Spring Session that enables this that currently features two implementations:

  • In-Memory sessions - which you should combine with an a sticky sessions proxy if you plan to run multiple instances.

  • Redis sessions - In this case Redis is used to store sessions and non-blocking I/O is used to read/write sessions to Redis.