HTTP logs in RESTful SOA

The RESTful SOA system that we’re building is turning out to be a bit of a beast. We’re approaching a point where there are lots of inter-service chatter going on, and because there are so many independent moving parts in play, it is hard to keep track of where things are ‘crapping’ up.

This is where apache/nginx server logs and HTTP status codes have come into their own.

While performance takes a big hit when inter-service communication is done over HTTP, it comes with some advantages. The HTTP gap we’ve wedged in between services has allowed us to debug and interact with services individually. It has also given us a far more visibility on how our services are responding to each other, and to user requests.

With our services, we’ve worked very hard to adhere closely with standard HTTP status codes – e.g. 403 Unauthorized, 404 Resource not found, 400 Bad Request, etc.

In the past week, it seems our diligence has started to pay off because we’ve been able to quickly diagnose issues by simply tail-ing the HTTP logs files, watching the URL requests and tracking the status codes. This has helped us narrow the scope of concern very quickly and zero in on the source of a problem.