Restricting maximum parallel connections

[prev] [thread] [next] [Date index for 2005/02/06]

From: Pratik
Subject: Restricting maximum parallel connections
Date: 17:42 on 06 Feb 2005
Hi Everyone !

Currently, I am implementing a mechanism to restrict the number of
parallel connections to the server from a single client/user.

The mechanis is something like :

- Use Cache::FastMmap to share the data between multiple processes.

- PerlAccessHandler will get the key for cache to get the current
count of alive connections.

The key could be some URL parameter, cookie or IP.

It increments the count by 1 and stores the result back into the cache. 

Deny the connection if count exceeds the maximum limit.

-PerlCleanuphandler decrements the count.

I am interested in knowing if I am missing some obvious point here.
This mechanism is working nicely. Are there any better alternatives
available without any overhead of chache/locking etc.

Thanks,
Pratik
        -- 
        http://pratik.syslock.org

Restricting maximum parallel connections
Pratik 17:42 on 06 Feb 2005

Re: Restricting maximum parallel connections
Perrin Harkins 18:07 on 06 Feb 2005

Re: Restricting maximum parallel connections
Perrin Harkins 21:40 on 06 Feb 2005

Re: Restricting maximum parallel connections
Perrin Harkins 17:41 on 07 Feb 2005

Re: Restricting maximum parallel connections
Joseph A Nagy Jr 12:56 on 07 Feb 2005

Generated at 21:37 on 09 Feb 2005 by mariachi v0.52