locked
How to handle more than 1000's of requests on same page. RRS feed

  • Question

  • Hello every one,

    Please give me any suggestions for below problem.

    I am woking on email marketing project, Using my application my client sending millions of mail to customers. When the customer opens those emails, we are tracking open count using .cs (Insert Contact details in One Table) page in my  application.

    Thousands of customers opent that mail in same time, CPU usage takes alomost takes 100% in server. This the reason we have facing lot of perfromence issues because at the smae time client wants login in my site, server does not allow.

    Thanks,


    Thanks & Regards, Swaroop

    Wednesday, October 23, 2013 5:57 AM

Answers

  • Thank for your reply. 

    i got one way to solve this problem that is first of all takes the requests and creating notepad file for that requests based on time. Our back end service takes this notepad files and processes it and insert in database.



    Thanks & Regards, Swaroop

    Monday, October 28, 2013 5:41 AM
  • Looks like you don't need to immediately process those requests, if a plain text file works, you may want to consider using a dedicated database table to store these "to-be-processed" requests, which should yield better performance than constantly writing a huge number of txt files. For even better performance, try putting these requests to an in-memory queue that can be process by another thread. This is effectively an async scenario that the request returns immediately, leaving the web server unblocked while the backend process are queued and executed.

    Cheers, Daniel

    • Marked as answer by swaroop1069 Wednesday, November 6, 2013 11:08 AM
    Tuesday, October 29, 2013 6:58 AM

All replies

  • There are several options.

    First, what operation exactly is blocking your server?

    Anyway, I'll try solving this by using async request handlers (.net 4.5 async/await) and data from each request put into a queue, not processing them immediately - but instead using a dedicated task that processes that queue. This way you'll increase scalability big time. If this still isn't enough you'll probably have to solve it by adding more hardware (perhaps a dedicated server, or a server farm or something like that).

    Hard to say since you didn't provide much data.


    Miha Markic [MVP C#] http://blog.rthand.com

    Wednesday, October 23, 2013 9:24 AM
  • Thank for your reply. 

    i got one way to solve this problem that is first of all takes the requests and creating notepad file for that requests based on time. Our back end service takes this notepad files and processes it and insert in database.



    Thanks & Regards, Swaroop

    Monday, October 28, 2013 5:41 AM
  • Looks like you don't need to immediately process those requests, if a plain text file works, you may want to consider using a dedicated database table to store these "to-be-processed" requests, which should yield better performance than constantly writing a huge number of txt files. For even better performance, try putting these requests to an in-memory queue that can be process by another thread. This is effectively an async scenario that the request returns immediately, leaving the web server unblocked while the backend process are queued and executed.

    Cheers, Daniel

    • Marked as answer by swaroop1069 Wednesday, November 6, 2013 11:08 AM
    Tuesday, October 29, 2013 6:58 AM