locked
Is it possible to redirect another worker process in web garden RRS feed

  • Question

  • User2096017448 posted

    Hi,

    I have some static data in my web application.  When I deploy web application to a web garden environment, it works incorrectly.  I know it is because request run in different worker process.  I also know to solve this problem, I should make my static data serializable and use state server. 

    But I only wonder, is it possible to redirect request to another worker process which has initialized static data?  Or is there a way to implement request stick to one worker process(request affinity)?

    Thanks.

    Sunday, January 26, 2014 3:35 AM

Answers

  • User-823319154 posted
    Thanks for your feedback.
    According to current information, I don't think it is possible to redirect request to another worker process as you describe above.
    First the worker processes start up as needed,
    Because Web gardens enable the use of multiple processes, each process will have its own copy of application state, in-process session state, caches, and static data. Web gardens should not be used for all applications, especially if they need to maintain state. Be sure to benchmark the performance of the application before deciding whether Web garden mode is appropriate.
    When using session state, be aware that worker process isolation mode does not support routing requests back to a process that originated the request back.
    As each request arrives, it is automatically sent to the next sequential process. For example, if a Web garden has 4 processes, requests are sent to processes 0, 1, 2, and 3, in that order. The cycle is then repeated for additional requests.
    hope it helps.
    Regards
    Angie
    • Marked as answer by Anonymous Tuesday, September 28, 2021 12:00 AM
    Friday, January 31, 2014 2:04 AM

All replies

  • User2096017448 posted

    Anyone?

    Sunday, January 26, 2014 7:55 PM
  • User-823319154 posted
    Thanks for your feedback.
    According to current information, I don't think it is possible to redirect request to another worker process as you describe above.
    First the worker processes start up as needed,
    Because Web gardens enable the use of multiple processes, each process will have its own copy of application state, in-process session state, caches, and static data. Web gardens should not be used for all applications, especially if they need to maintain state. Be sure to benchmark the performance of the application before deciding whether Web garden mode is appropriate.
    When using session state, be aware that worker process isolation mode does not support routing requests back to a process that originated the request back.
    As each request arrives, it is automatically sent to the next sequential process. For example, if a Web garden has 4 processes, requests are sent to processes 0, 1, 2, and 3, in that order. The cycle is then repeated for additional requests.
    hope it helps.
    Regards
    Angie
    • Marked as answer by Anonymous Tuesday, September 28, 2021 12:00 AM
    Friday, January 31, 2014 2:04 AM
  • User2096017448 posted

    Hi Angie,

    Thanks for your patient reply.  I gave up to find out this approach.

    Thursday, February 20, 2014 4:24 AM