Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Catalyst::Plugin::StatusMessage across multiple 'app' servers

So I'm using Catalyst::Plugin::StatusMessage in my Catalyst app. The only issue is that right now I have a load balancer with two app servers behind it, both running catalyst. Because of this, if a status message is set on one app server, and then the user is redirected and then the load balancer sends them to the second app server, the user won't see the status message because the status messages are local to the app servers. Is there anyway that I could share these status messages across app servers, so that I don't have to worry which server the load balancer sends them to? Thanks!

like image 897
srchulo Avatar asked Oct 06 '22 08:10

srchulo


1 Answers

If your status messages are local to your app-servers, does that imply that $c->session is using FastMmap or File as its Session::Store? The same issues must apply to anything in the session, presumably?

Given that C::P::StatusMessage uses the session to manage its messages, you might have to change Session::Store to use a database-backed storage mechanism. There are quite a few such options, the most likely candidate being Catalyst::Plugin::Session::Store::DBIC

like image 77
RET Avatar answered Oct 10 '22 03:10

RET