Stubby


Stubby is a stubbing platform providing preset responses to HTTP requests, that was built to accomodate operations-specific troubleshooting requirements for a large-scale mobile portal.

General view, with a list of the available stubs

General view, with a list of the available stubs

Background

Its primary use case is to emulate slow or badly-responding backend services. In a large-scale production environment, where the applications often failed due to downstream services which were unreliable or buggy, it proved itself extremely useful to speed up troubleshooting.

Uses

Some usage examples, usually reproducing failing scenarios:

  1. to figure out how our applications handled downstream request timeouts
  2. when downstream HTTP response headers appeared to be the cause of an issue
  3. when provided content appeared to be invalid, it allowed for rapid prototyping of possible solutions
  4. to manipulate caching headers to investigate why some issues were occurring

However, due to its nature it can be used for load testing too, it handles quite a bit of load and can be scaled out quite easily.

Features

Stubs can be customized in many ways:

  • custom HTTP response code
  • unlimited HTTP response headers
  • override default headers, like content-length, content-type, cache-control, etc.
  • configurable response delay, from instant responses to randomly-changing delays in an interval, or fixed delays
  • support for any kind of HTTP payload, binary or text

It comes with built-in documentation and user manual.

Detailed view of a stub, with customized response headers.

Detailed view of a stub, with customized response headers.

Technology

Stubby was built using the Grails framework (Java), runs on Tomcat with a MySQL database backend.