We already have a fully operational web service which caters requests from multiple paltform devices. Each device sends only one request at a time and immediately after a response for the request the device sends an applicative ACK, this ack message is like a regular request message, and it's all via http.

During a performance/load test we discovered that the following situation happens alot: regular requests gets processed ok but when the ack message is sent, it is thrown because the server can't handle too many requests.

We accept the case that the server throws requests because of overload, but we do not accept throwing ack messages.

So essentially we want the server to process 2 requests at a time for each device, is there anyway to do it in the current situation?

if not, what kind of changes do we need to do?

  • Why? WCF ensures the response is sent correctly. If client doesn't get correct response it should be on client to try it again. – Euphoric Jul 23 '12 at 13:29
  • @Euphoric I think that retrying in this situation will only make the problem bigger, I am already talking about a situation where too many requests were sent, so now all the rejected acks will retry and make it even worse, plus it can be rejected again and again... – Mithir Jul 24 '12 at 5:53
  • I was talking about completly removing ACKs. Service-based communication is not low-level nonguaranteed, that you would need to send ACKs from client. Server should assume the response was sent correctly unless clients requests it again. – Euphoric Jul 24 '12 at 6:09
  • @Euphoric is this true regardless of the client? in this case we have many different devices, some of them are proprietary devices with a proprietary OS, I am not developing on these devices so I am not aware of disadvantages they may have. – Mithir Jul 24 '12 at 6:13
  • I dont know what this has something to do with different devices. I never saw service, that would requires this. Most of the time, the server doesn't care if client recieved the response or not. And you are saying, that you are developing a service without knowing how it will be used on client? What kind of service is that? – Euphoric Jul 24 '12 at 6:20

I'm thinking you need something like Apache's KeepAlive (my site). httpd will keep the connection open to the browser until a timeout is reached. So that connection is effectively reserved for that browser session for a few seconds.

If your request + ACK are using two separate connections your server may hit its limit and reject or delay some requests. Keeping the connection open a short time is also a performance benefit since there are less connections needed to open.

  • sorry if I didn't clarify this, but there is no browser here, just http requests. – Mithir Jul 23 '12 at 14:00
  • Yeah, I figured that. But the same applies. While your client apps may not be browsers or on a desktop, the same networking and HTTP rules are in play. – Matt S Jul 23 '12 at 14:16
  • -1: This answer does not really apply to WCF - I would hazard a guess that the author is very familiar with Apache and hopes that some advice that works for situations where Apache is in use will be useful here. – Kyle Hodgson Jul 23 '12 at 17:04
  • @KyleHodgson: That's fair. I haven't worked on a .Net server in 7 years, so I can't provide anything more specific to Mithir's situation. The same networking rules apply and hopefully his server has similar configuration options. – Matt S Jul 23 '12 at 17:56
  • @MattS the trouble is that WCF can be self hosted or hosted in IIS, and many WCF services aren't even HTTP based... it's pretty different. – Kyle Hodgson Jul 23 '12 at 18:59

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.