c++ - Isapi filter - state -
i have isapi filer , want add logic based on incoming domain ( server farm hosts many domains). there domain list dynamic , can export these domain list text file , read isapi , there way keep file in memory (is array or linked list) save io call. similar global application state .
how worker processes distributed across servers? have 1 server 1 worker process, or multiple servers?
if have 1 server 1 worker process, can read file static array or string manage (just make sure account concurrent threads reading/modifying simultaneously)
if have multiple worker processes on 1 server, can use named shared memory. i've used before in isapi filters share information, , works pretty well. should take care of concurrency you. can read more here: http://msdn.microsoft.com/en-us/library/aa366551%28v=vs.85%29.aspx
if you're spread across multiple servers, use distributed cache memcached. more complex set up, it'll give performance. there's thread on setting here: c++ api memcache
Comments
Post a Comment