All Projects → gptankit → serviceq

gptankit / serviceq

Licence: Apache-2.0 license
Super fault-tolerant HTTP load balancer & queue. White paper for reference - https://github.com/gptankit/serviceq-paper

Programming Languages

go
31211 projects - #10 most used programming language
Makefile
30231 projects

Projects that are alternatives of or similar to serviceq

rlb
Redirecting Load Balancer
Stars: ✭ 30 (-54.55%)
Mutual labels:  http-proxy, load-balancer
Multitor
Create multiple TOR instances with a load-balancing.
Stars: ✭ 624 (+845.45%)
Mutual labels:  http-proxy, load-balancer
Armor
Uncomplicated, modern HTTP server
Stars: ✭ 1,629 (+2368.18%)
Mutual labels:  http-proxy, load-balancer
dnsdisco
DNS service discovery library
Stars: ✭ 25 (-62.12%)
Mutual labels:  load-balancer
LiveProxies
Asynchronous proxy checker
Stars: ✭ 17 (-74.24%)
Mutual labels:  http-proxy
Proxy
The type-safe REST library for .NET Standard 2.0 (NetCoreStack Flying Proxy)
Stars: ✭ 40 (-39.39%)
Mutual labels:  load-balancer
php-proxy
php proxy based on GoAgent protocal,Implemented by golang
Stars: ✭ 85 (+28.79%)
Mutual labels:  http-proxy
Architeuthis
MITM HTTP(S) proxy with integrated load-balancing, rate-limiting and error handling. Built for automated web scraping.
Stars: ✭ 35 (-46.97%)
Mutual labels:  load-balancer
android-sdk
AppSpector is a debugging service for mobile apps
Stars: ✭ 39 (-40.91%)
Mutual labels:  http-proxy
freeproxy
Get http proxies from some free proxy sites. (爬取免费HTTP代理)
Stars: ✭ 18 (-72.73%)
Mutual labels:  http-proxy
k8s-deployer
Deploy Kubernetes service and store retrieved information in the Consul K/V store
Stars: ✭ 23 (-65.15%)
Mutual labels:  load-balancer
vex
reverse HTTP proxy tunnel via secure SSH connections.
Stars: ✭ 20 (-69.7%)
Mutual labels:  http-proxy
small-proxy
Go实现的一个跨平台域名式访问内网穿透工具
Stars: ✭ 49 (-25.76%)
Mutual labels:  http-proxy
web-proxy-script
Minimalist web proxy script
Stars: ✭ 55 (-16.67%)
Mutual labels:  http-proxy
trickster
Open Source HTTP Reverse Proxy Cache and Time Series Dashboard Accelerator
Stars: ✭ 1,753 (+2556.06%)
Mutual labels:  http-proxy
kube-template
Watches Kubernetes for updates, writing output of a series of templates to files
Stars: ✭ 27 (-59.09%)
Mutual labels:  load-balancer
nanoproxy
Small fast HTTP forward proxy in Go.
Stars: ✭ 31 (-53.03%)
Mutual labels:  http-proxy
ddal
DDAL(Distributed Data Access Layer) is a simple solution to access database shard.
Stars: ✭ 33 (-50%)
Mutual labels:  load-balancer
COVID19-FeedbackApplication
A simple application is developed to get feedback from a user and analyzing the text to predict the sentiment.
Stars: ✭ 13 (-80.3%)
Mutual labels:  load-balancer
llb
Dead simple event-driven load-balancer
Stars: ✭ 27 (-59.09%)
Mutual labels:  load-balancer

ServiceQ Build Status GoDoc

ServiceQ is a fault-tolerant gateway for HTTP clusters. It employs probabilistic routing to distribute load during partial cluster shutdown (k/n nodes experiencing downtimes, timeouts, connection loss etc) and queues requests during total cluster shutdown (n nodes down). The queued requests are forwarded in FIFO order when the cluster is available next.

Below graph shows the routing probability (P) on a down node (D) in a 8-node cluster with respect to number of requests (r). Notice how quickly the routing probability on D reduces as the requests on D start to fail. Depending on the rate of request, it will only take a few seconds (sometime even milliseconds) to move all requests away from D, thus ensuring more requests are routed to healthier nodes.

Note that, even when requests keep failing on D (however less), ServiceQ retries them on other nodes until they succeed. If they do not succeed on any of the nodes, they are queued and periodically retried on the cluster (using the same approach above), until they succeed.

Noticeable features

  • HTTP Load Balancing
  • Probabilistic node selection based on error feedback
  • Failed request queueing and deferred forwarding
  • Upfront request queueing
  • Request retries
  • Concurrent connections limit
  • Complete TLS/SSL support (automatic and manual)

Here are the steps to run ServiceQ -

Download

Clone the project into any directory in your workspace

$ git clone https://github.com/gptankit/serviceq

Change into directory serviceq

How to Build

$ make ('make build' will also work)

Optional: make with debug symbols removed (~25% size reduction)

$ make build-nodbg

This will create a Go binary serviceq in the current directory

How to Install

Make sure the current user has root privileges, then -

$ make install

This will create a folder serviceq in /usr/local directory and copy the serviceq binary (generated in the build step) to /usr/local/serviceq and sq.properties (serviceq configuration file) to /usr/local/serviceq/config.

How to Run

Before running, make sure the mandatory configurations in /usr/local/serviceq/config/sq.properties are set (LISTENER_PORT, PROTO, ENDPOINTS, CONCURRENCY_PEAK). The configuration file closely resembles a typical INI file so its fairly easy to understand and make changes -

#sq.properties

#Port on which serviceq listens on
LISTENER_PORT=5252

#Protocol the endpoints listens on -- 'http' for both http/https
PROTO=http

#Endpoints seperated by comma (,) -- no spaces allowed, can be a combination of http/https
ENDPOINTS=http://my.server1.com:8080,http://my.server2.com:8080,http://my.server3.com:8080

#Concurrency peak defines how many max concurrent connections are allowed to the cluster
CONCURRENCY_PEAK=2048

Also, verify timeout value (default is set to 5s). Low value is preferable as it allows retries to be faster -

#Timeout (s) is added to each outgoing request to endpoints, the existing timeouts are overriden, value of -1 means no timeout
OUTGOING_REQUEST_TIMEOUT=5

By default deferred queue is enabled with all methods and routes allowed. These options can be controlled as -

#Enable deferred queue for requests on final failures (cluster down)
ENABLE_DEFERRED_Q=true

#Request format allows given method/route on deferred queue -- picked up if ENABLE_DEFERRED_Q is true
#Q_REQUEST_FORMATS=POST /orders,PUT,PATCH,DELETE
#Q_REQUEST_FORMATS=ALL
Q_REQUEST_FORMATS=POST,PUT,PATCH,DELETE

(Note that Q_REQUEST_FORMATS is also considered if ENABLE_UPFRONT_Q is true)

After all is set -

$ sudo /usr/local/serviceq/serviceq

Refer wiki for more details: https://github.com/gptankit/serviceq/wiki

Feel free to play around and post feedbacks

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].