Coder Social home page Coder Social logo

nozzle's Introduction

nozzle

Control the flow of http requests.

Problem

The basic problem is that servers are very bad at responding to varying response times. When a server performance begins to degrade it is generally not aware of it. It doesn't descriminate the requests it is getting it just keep on trying to serve them no matter how long they are expected to take.

The idea for Nozzle is that a proxy with a small amount of intellegence and memory could potentially make better decisions about handling client requests. There are some basic assumptions:

  • The servers that are downstream are not heterogenious
  • Failing a client request quickly is better than sending it to an overloaded or slow server
  • Response times can be bucketed (grouped) by hashing the request path and parameter names

Hypothesis

Client request can be bucketed into queues based on average reponse time of the hashed request path and parameter names. Based on the average reponse time the request queue size would be based on a simple formula:

queue size = ( (1/reponse time) * response rate) / max reponse time

Once the number of client requests filled the queue the request would be dropped at the proxy until there was more room on the queue. If response time decreased then the queue size will increase. If the response time increases the queue size would decrease. The failures would expose backpressure dynamically.

Implementation Ideas

Vulcanproxy

Initial implementation could use https://www.vulcanproxy.com/library.html#limiter to support rate and connection limits. However the basic calculation of throughput would still need to be implemented in the vulcan middleware concept.

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.