in reply to Looking for general pointers on Apache::Session

The "fastest" way to store session data is just within your Apache process.

But usually, you are running more than one Apache process (unless you run the MPM threads model only). So you will want to share the session data among processes because you never know which process will handle the next request of the user. So you maybe want to use some shared memory that Apache also provides, like APR::Table.

But that information gets lost if you have more than one machine and don't want the headache of pinning a source IP address to a server. Then maybe you want to persist the session data to some other shared medium, like a Redis server, or a database, or just as a JSON file to a shared disk.

There are many options and not all of them are equally suitable to all situations. This is why there are modules like CGI::Session that implement various methods of storing sessions.

If you are Google-scale, you maybe want to keep the session stored on the users machine and just verify that the session is still as you sent it to the user by using cryptographically signed session cookies. This is what JWT is all about.

Usually, if you are going the route of using a database table as session store, you will have to create that table yourself.

  • Comment on Re: Looking for general pointers on Apache::Session