GithubHelp home page GithubHelp logo

guozi058 / balancer Goto Github PK

View Code? Open in Web Editor NEW

This project forked from xieyugui/balancer

0.0 1.0 0.0 35 KB

Trafficserver plugin : The balancer balances requests across multiple origin servers.

Makefile 49.22% C++ 50.78%

balancer's Introduction

balancer

具体用法:请参考https://docs.trafficserver.apache.org/en/latest/reference/plugins/balancer.en.html

在roundrobin 模式下新增 backup、weight、max_fails、fail_timeout ,以及add path和开启https回源的功能:

####backup=number marks the server as a backup server. It will be passed requests when the primary servers are unavailable.by default, 0 --(0/1)

####weight=number sets the weight of the server, by default, 1.

####max_fails=number sets the number of unsuccessful attempts to communicate with the server that should happen in the duration set by the fail_timeout parameter to consider the server unavailable for a duration also set by the fail_timeout parameter. By default, the number of unsuccessful attempts is set to 3. The zero value disables the accounting of attempts. What is considered an unsuccessful attempt is defined by the proxy_next_upstream, fastcgi_next_upstream, uwsgi_next_upstream, scgi_next_upstream, and memcached_next_upstream directives.

####fail_timeout=time sets the time during which the specified number of unsuccessful attempts to communicate with the server should happen to consider the server unavailable; and the period of time the server will be considered unavailable. By default, the parameter is set to 10 seconds.

#For example: map http://foo.com http://foo.com @plugin=balancer.so @pparam=--policy=roundrobin @pparam=--https @pparam=one.bar.com:80,0,1,3,10 @pparam=two.bar.com,0,1,3,10

#Add path: map http://foo.com http://foo.com @plugin=balancer.so @pparam=--policy=roundrobin,0/ @pparam=one.bar.com:80,0,1,3,10 @pparam=two.bar.com,0,1,3,10
if client request http://cdnxxx.com/1.jpg then ATS will back to the source server request http://cdnxxx.com/0/1.jpg

balancer's People

Contributors

xieyugui avatar

Watchers

 avatar

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.