Monday, February 28, 2011

Jetty Session Clustering with Redis

We've open-sourced this week at Ovea a Jetty plugin to add Session Clustering to Jetty by using Redis.
Redis is a high-performance No-Sql database which is commonly used for key-value storage, caching, ... Redis has a lot of interesting features such as transactions and publish/subscribe.

The Jetty module jetty-session-redis uses Jedis, the Java client of Redis.

The configuration is completely transparent for a Webapp since you only need to modify the jetty.xml server configuration plus de webapp context files.

We have also implemented several serializers for your session attributes:
  • XStream
  • JSON
  • JBoss Serializer
  • JDK Serializer
You can also implement you own by implementing a the Serializer interface. Gzip compression is also supported to reduce the length of serialized objects.

The project can be found at https://github.com/Ovea/jetty-session-redis, with an extensive README file to help you for the setup. It is currently in snapshot state (we plan to release a beta soon). All comments and bugs are welcomed !

We also plan to implement for higher performance an asynchronous save system and support Redis key/value based on bytes to improve performance.

Mathieu.

No comments:

Post a Comment