I've a large F5 LTM load balancer environment I'm looking after which we are configuring to rate limit requests at a URI level. For human web users we are 302ing them to a busy page, but we also run web services and need to politely tell the soap client to go forth and procreate as well. Not knowing a whole heap about SOAP/XML responses I'm not clear on what we should tell the client. Will a very basic 500 reponse suffice or do we need to craft an legit SOAP response as well?

link|improve this question
feedback

closed as off topic by grawity, BBlake, techie007, Daniel Beck, Sathya Jan 13 at 12:23

Questions on Super User are expected to generally relate to computer software or computer hardware, within the scope defined in the faq.

1 Answer

up vote 3 down vote accepted

The SOAP response is determined by the service definition (i.e. WSDL) outside that it is common to use appropriate HTTP response codes for circumstances outside the "contract".

Rather than being lazy and using 500, I'd choose from:

  • 409 Conflict
  • 410 Gone
  • 417 Expectation Failed
  • 429 Too Many Requests
  • 501 Not Implemented
  • 503 Service Unavailable
  • 509 Bandwidth Limit Exceeded
  • 507 Insufficient Storage

Review the full list and choose the most appropriate.

If the server is capable of returning an XML document detailing the error then it is normal to do so. The SOAP Services I use have this allowed for in the service definitions.

The client has to be able to cope with unadorned HTTP errors as sometimes a server fault occurs before the request XML is even parsed.

link|improve this answer
I have been using 503's actually, not being intentionally lazy. It sounds like there is limited merit in providing anything additional to the client without specifically knowing the wsdl's and the likes then. thanks – Chris Phillips Jan 13 at 11:28
feedback

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