c# - Caching architecture advise for a specific scenario -


setup:

we have .net application distributed on 6 local servers each local database(oracle), 1 main server , 1 load balance machine. requests come load balancer redirects incoming requests 1 of 6 local servers. in time intervals data gathered in main server , redistributed 6 local servers able make decisions complete data.

each local server has cache component caches incoming requests based on different parameters (location, incoming parameters, etc). each request local server decides whether go database (oracle) or response cache. in both cases local server has goto database 1 insert , 1 update per request.

problem:

on peak day each local server receives 2000 requests per second , system starts slowing down (cpu: 90% ). trying increase capacity before adding local server mix. after running benchmarks bottleneck is, seems inevitable 1 insert , 1 update per request database.

tried methods

to able decrease frequency have created windows service sits between db , .net application. contains pipe server , receives each insert , update main .net application , saves them in hashtable. new service @ time intervals goes database once batch inserts , updates. point go database less frequently. although had positive effect didn't benefit system load as expected. of cpu load comes oracle.exe requests per second increase.

i trying avoid going database as can , way avoid db seems increasing cache hit ratio other above mentioned solution tried. cache hit ratio around 81 % percent currently. because each local machine has own cache missing lots of cacheable requests. when 2 similar requests redirects different servers second request cannot benefit cached result of first one.

i don't have lot of experience in system architecture appreciate problem. suggestions on different caching architectures or setup, or tools welcome.

thank in advance, made question clear.

for me looks application timesten solution. in case can eliminate local databases , return one. have local oracle databases, can implement cache grid. going awt (async, write through) cache. see oracle in-memory database cache concepts it's not cheap option if worth investigating. can keep concentrating on business logic , have no worries speed. of course works good, if aplication code tuned , sql performant , scalable. sql has prepared (using bind variables) have best performance. application connects cache , no longer database. create cache tables in cache group want have caching. tables in sql should cached, otherwise, complete sql passed through oracle database. in grid cache fusion mechanism in place have no worries data in grid located. in current release support .net included. data consistent , asynchronously updated oracle database. if data needed in cache , take oracle database down, app can keep running. database again, synchronization pick again. powerful.


Comments

Popular posts from this blog

php - What is the difference between $_SERVER['PATH_INFO'] and $_SERVER['ORIG_PATH_INFO']? -

fortran - Function return type mismatch -

queue - mq_receive: message too long -