title: Scaling a stateful server
body: <p>I have kind of an architectural dilemna right now. I'm building a Texas Holdem Poker app and I'm trying to think of a way to scale my stateful server.</p>
  
  <p>The server is in node js and works with Pomelo (a library build on top of Socket.io if I am not mistaken). The server manages all the game logic and is therefore stateful.</p>
  
  <p>I'm thinking about using "cache as a service" solutions like redis but I'm not sure if it would do the job.</p>
  
  <p>I'd really be interested if somebody could give me guidance or refer me to nice articles about this topic. Scaling stateless services is a piece of cake nowadays but their stateful counterpart are (almost) never spoken off.</p>
  
  <p>Thank you!</p>
  
  <p>EDIT: Apparently, this is an opinion based question, so let me reformulate it... How do you scale a stateful socket.io server that maintains the table data (for each poker game) in cache? For now, I have two solutions that come in mind. Either use redis's pub/sub functionnality, or use a cache as a service provider like amazon's ElastiCache. Any one can refer me to articles or anything that could help me shed light and understand better this problem?</p>