locked
Relability, scalability and performance RRS feed

  • Question

  • We are creating a system for Order processing .

    Order numbers to be passed from a windows service to webservice

    For maximum performance and scalability  in web garden and web farm environment(for web service), we have following aproaches:-

    1) Calling web service from windows service in sequential manner to make sure that order do gets processed(reliability) before control given back to windows service. This approach however will not be able to utilize web garden and web farm approach as we are calling web service sequentially.This will also hit the number of orders which can be processed in a smaller time.

    2) Calling web service from windows service asynchronously. This will increase the performance however it might land up in time out/ service not available and orders not really getting processed.This will do make use of web garden and web farm but not ensuring that order will actually gets processed.

    3) Calling web service synchronously but in multiple threads inside FOR loop in windows service. Number of thread will be related to number of worker threads available to process the requests in web garden on a web server. For loop will use stack to ensure that all oders gets processed. Only demerit in this approach is that it would not be able to make use of web farm though it is making full use of web garden.

    Can somebody please propose any approach which can ensure order processing, making use of web garden and web farm.

    Waiting for reply from all architects here

    Cheers

    TicArch 

    Saturday, April 24, 2010 12:31 PM

All replies

  • I've designed ( and built ) several sales order processing systems.  Including one with very high peak throughput.  Another uses asynchronous calls to WCF.

    Why are you thinking of having a web service and a windows service as well?  Why not one WCF service?  Handing data across layers is an overhead and a complication you want to avoid if you can.

    Does the end user have to see an order number straight away?  An alternative to consider is to give them the old "order placed, please check your inbox for confirmation email" kind of message straight away.  Some small proportion of orders fail and the end user gets no email.  So they're mildly unhappy but you don't need the overhead of passing back asynchronous results.

    What's your expected peak throughput?  Would it be significant if you wait for one order to finish processing before raising the next?

    If it is, and your throughput is high then you might consider making part of an order key significant and splitting load across several business servers. So each server is raising the next id sequentially but say server A has orders starting A, Server B has orders starting B. etc. 

    Business servers can be pretty cheap and you can cache relatively static data on them to reduce IO to the database server.  OTOH if you only expect a thousand orders a day then you don't need 6 business servers.  If you're expecting 200, 000 then all sorts of things start to matter and you need to look at all sorts of patterns in the orders and when they're placed using what resources.  Extremely high throughput requires specialist skills.

    Sunday, April 25, 2010 11:07 AM
  • Greetings,

    Why do you need a window service , you call the web service directly from your application. How the load of the applications can be distributed using a web garden or web farm?

    How will you design and program your web service matter most here. Any simple or complex operations can be performed in a web service based on the functional requirement given your customer business requirement. Regarding the  server configuration , I would suggest you to use window server 2008 with IIS 7.0.

    Take Care

    PL


    Helping People To Solve Technical Problems
    Sunday, April 25, 2010 3:33 PM
  • I want to use both web garden as well as web farm.

    Now i am thinking of using asynchornous call from windows service to web service,with callback attached.

    In multithreading, we would be able to use web grden but not web farm automatically.

    what do you opinion

    Tuesday, April 27, 2010 4:58 PM