I'm moving a project to google cloud and I'm looking for some best practices on session management. My current application simply leverages native PHP Sessions on the web server. However, I'll now end up with a H/A architecture for both my web servers as well as the API servers and need a single source session management. I've ruled out any form of sticky session affinity as an option for various reasons.
I'm considering two options:
Store sessions in DB instance - In this case it would be a MySQL instance, likely the same datastore that the application data is stored in. I can see a potential performance issue here having to hit the DB an extra time with every request.
Store sessions in memory - Stand up a standalone H/A Redis (or equiv.) server to manage sessions.
Are there any other options I should consider or pros and cons that make one option more suitable for this scenario? For example, leveraging Redis will result in increased GCP expenses.