Giter VIP home page Giter VIP logo

fragile's Introduction

fragile The Fragile API Proxy

A Nine Inch Nails themed API proxy for testing app resiliency.

Rational:

When integrating apps to an API, they usually work, but when deploying those apps out to the public, they are behind web proxies, on unreliable/slow connections, and many other things you can't control.

The Fragile API Proxy is an easy way to add random errors into your API calls.

Nine Inch Nails album names are surprisingly good function names for this usecase.

Usage:

Goal: Deploy to an API gateway and any request pre-pended with /fragile/ will have subtle random errors introduced into the request or response.

Fragile API call: http://api.example.com/fragile/v1/dogs?key=:key&expand=owner

Will proxy to this API call, randomly introducing errors: http://api.example.com/v1/dogs?key=:key&expand=owner

Run locally:

node serve.js [host to proxy to] [port to listen on]

Functions:

  • Y34RZ3R0R3M1X3D Y34RZ3R0R3M1X3D - Randomly change a few characters in the response.
  • downward_spiral downward_spiral - Add 12 seconds to the response
  • fdts further_down_the_spiral - Add 2 minutes to the response
  • fixed fixed - randomly give no error :)
  • broken broken - Mess with query string before sending
  • tfa things_fall_apart - Random 400 error response
  • sin sin - no body
  • tdtwww Todo: the_day_the_world_went_away - close connection without http response
  • More to come. - http://www.ninwiki.com/Halo_numbers

Caveats/Todos

  • Literally hacked together while kids watched Tangled.
  • JS is not my primary language, only second node.js thing I've built.
  • Probability tweaks should be more easily configurable.
  • More methods

fragile's People

Contributors

erichelgeson avatar erfanian avatar

Stargazers

 avatar Alessandro Annini avatar Peter Lynch avatar Lluis Ingles avatar brian ridley avatar  avatar Miha Hribar avatar Alex Soto avatar Matt Burton avatar Emre GULCAN avatar

Watchers

 avatar James Cloos avatar  avatar

fragile's Issues

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.