Menu

#2 Extending AuthMySQLKeepAlive funcionality

open
None
5
2004-09-08
2004-02-26
Tom Collins
No

I haven't done much with mod_auth_mysql yet, but I already see
a possible improvement in the AuthMySQLKeepAlive option.

If I host multiple virtual clients, each one will have their own
database (with MySQL username and password) for storing login
information. Therefore, the server can't make use of
AuthMySQLKeepAlive (host stays the same, but User and Password
change).

Would it be possible to keep the connection open, and remember
the Host, User and Password used to establish the connection.
Then, when another request comes in, if the Host, User and
Password are the same, you can re-use the connection. If they
are different, then you close the connection and open a new one.

If a web browser is loading a page with a few dozen IMG files in a
protected directory, you're going to be opening a lot of connections
to MySQL. There could be a considerable performance
improvement by caching the open connection.

Discussion

  • Jerry Stuckle

    Jerry Stuckle - 2004-09-08

    Logged In: YES
    user_id=1049703

    Yes, I think this would be possible. I'll investigate it
    for the next release.

    Another option which would be harder to implement but also
    possible would be to keep a table of
    database/username/password requests. However, the number of
    connections could grow quite large with multiple virtual
    users. I would want to put a maximum number of connections
    option in there, also.

    It's somthing I'll look into.

     
  • Jerry Stuckle

    Jerry Stuckle - 2004-09-08
    • assigned_to: nobody --> jstuckle
     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.