Ticket #1658 (new enhancement)

Opened 1 week ago

Last modified 1 day ago

Cookie balancer module

Reported by: kirakuna Assigned to: jan
Priority: normal Milestone: 1.5.0
Component: core Version: 1.4.19
Severity: normal Keywords: fcgi balance
Cc: Blocking:
Need Feedback: 1

Description

I have written module for balancing traffic between some count of fcgi modules. So it's called mod_cookie_balancer. Module is watching what cookie was received and redirect request to corresponding fcgi module. Thus we have separate web-users for each fcgi.

Configuration should be like this:

server.modules = ( 
	"mod_cookie_balancer", 
	"mod_fastcgi" 
)

mimetype.assign = (
	".html"         =>      "text/html"
)

server.indexfiles    = ("index.php", "index.html",  "index.htm")
server.event-handler = "linux-sysepoll"
server.document-root = "/home/kir/hash/docroot"

debug.log-request-header = "enable"
debug.log-response-header = "enable"
debug.log-file-not-found = "enable"
debug.log-request-handling = "enable"


server.bind="127.0.0.1"
server.port=8081

cb.count = 2
cb.prefix = "rpref"
cb.keyword = "userid"

fastcgi.debug = 1

fastcgi.server = ( "/rpref0" =>
  (( "host" => "127.0.0.1",
     "port" => 5051
  )),
  "/rpref1" =>
  (( "host" => "127.0.0.1",
     "port" => 5052
  ))
)

Module source attached.

Attachments

mod_cookie_balancer.c (5.0 kB) - added by kirakuna on 05/07/2008 04:57:47 AM.
mod_cookie_balancer.2.c (5.2 kB) - added by kir4 on 05/15/2008 04:26:10 AM.
v 1.01

Change History

05/07/2008 04:57:47 AM changed by kirakuna

  • attachment mod_cookie_balancer.c added.

05/07/2008 06:31:37 AM changed by stbuehler

  1. mod_magnet
  2. too many bugs in your code

05/15/2008 04:26:10 AM changed by kir4

  • attachment mod_cookie_balancer.2.c added.

v 1.01

05/15/2008 04:26:32 AM changed by kir4

1. Main feature of module is better speen under traffic-pressure than LUA-script. 2. Code was re-worked and improved, many mistakes was removed. Please, check it.


Add/Change #1658 (Cookie balancer module)




Change Properties