tellapart / aurproxy Goto Github PK
View Code? Open in Web Editor NEWLoad balancer manager with knowledge of Apache Aurora's service discovery mechanism and integration with Aurora's task lifecycle.
License: Apache License 2.0
Load balancer manager with knowledge of Apache Aurora's service discovery mechanism and integration with Aurora's task lifecycle.
License: Apache License 2.0
The assembled Docker image doesn't include libraries which are necessary on newer Mesos clusters, see AURORA-1487. Without these, startup fails:
Could not load MesosExecutorDriver!
Some application servers use https for their own communication. This should be trivial to extend and is a placeholder for myself to add.
@ThanosBaskous What do you think of setting up travis for aurproxy? That way any new PR will be unit tested as will any commits. I started playing with adding HEAD
request support to the http healthchecker last night and will be updating the tests.
I'd be happy to make a travis config for you if you've never used it. Two other large open source projects I co-maintain have used travis successfully. The saltstack corp guys use a jenkins instance they setup internally to test their proprietary stuff, but they were using travis quite successfully awhile back.
Depending on the application, HEAD can return less data than a GET request as hardcoded in this share adjuster with requests.get
.
Every time aurproxy writes out a new configuration, I get a line such as:
2015-07-07 10:41:20,677 [INFO] tellapart.aurproxy.backends.nginx.backend: Applying new configuration.
Exception AttributeError: AttributeError("'_DummyThread' object has no attribute '_Thread__block'",) in <module 'threading' from '/usr/lib64/python2.7/threading.pyc'> ignored
At first, I thought it was from the run_local('kill -HUP ...')
call in the nginx backend's restart()
, but changing that to something else has no effect. My guess is something in the gevent code is buggy and I'm not sure of the best way to find it (but would like to see no tracebacks).
I'm starting aurproxy via:
```bash
python -m "tellapart.aurproxy.command" run \
--sentry-dsn='gevent+https://<sentry_user>:<sentry_api_key>@<internal_sentry_server_url>/27' \
--management-port=31325 \
--config "$config_json"
With this config json:
{
"backend": "nginx",
"configuration_file": "/etc/nginx/nginx.conf",
"servers": [
{
"context": {
"default_server": "True",
"location_blacklist": []
},
"healthcheck_route": "/healthcheck/",
"hosts": [
"hello_world2.internal"
],
"ports": [
8080
],
"routes": [
{
"locations": [
"/"
],
"sources": [
{
"endpoint": "http",
"environment": "devel",
"job": "hello_world2",
"role": "jschroeder",
"share_adjusters": [
{
"curve": "linear",
"ramp_delay": 5,
"ramp_seconds": 60,
"share_adjuster_class": "tellapart.aurproxy.share.adjusters.RampingShareAdjuster",
"update_frequency": 10
},
{
"healthy_threshold": 2,
"interval": 10,
"port_name": "http",
"route": "/health",
"share_adjuster_class": "tellapart.aurproxy.share.adjusters.HttpHealthCheckShareAdjuster",
"timeout": 5,
"unhealthy_threshold": 3
}
],
"source_class": "tellapart.aurproxy.source.AuroraProxySource",
"zk_servers": "njb-zkl1:2181,njb-zkl2:2181,njb-zkl3:2181"
}
]
}
]
},
{
"context": {
"location_blacklist": []
},
"healthcheck_route": "/healthcheck/",
"hosts": [
"hello_world_flask.internal",
"hello_world_flask",
"hello_world_flask-prod",
"hello_world_flask-prod.internal"
],
"ports": [
8080
],
"routes": [
{
"locations": [
"/"
],
"sources": [
{
"endpoint": "http",
"environment": "devel",
"job": "hello_world_flask",
"role": "jschroeder",
"share_adjusters": [
{
"curve": "linear",
"ramp_delay": 5,
"ramp_seconds": 60,
"share_adjuster_class": "tellapart.aurproxy.share.adjusters.RampingShareAdjuster",
"update_frequency": 10
},
{
"healthy_threshold": 2,
"interval": 10,
"port_name": "http",
"route": "/health",
"share_adjuster_class": "tellapart.aurproxy.share.adjusters.HttpHealthCheckShareAdjuster",
"timeout": 5,
"unhealthy_threshold": 3
}
],
"source_class": "tellapart.aurproxy.source.AuroraProxySource",
"zk_servers": "njb-zkl1:2181,njb-zkl2:2181,njb-zkl3:2181"
}
]
}
],
"share_adjusters": [
{
"curve": "linear",
"seconds": 60,
"share_adjuster_class": "aurproxy.share.adjusters.RampingShareAdjuster",
"update_frequency": 10
},
{
"healthy_threshold": 2,
"interval": 3,
"route": "/health/",
"share_adjuster_class": "aurproxy.share.adjusters.HttpHealthCheckShareAdjuster",
"timeout": 2,
"unhealthy_threshold": 2
}
]
}
]
}
Sadly, nothing is being logged to sentry either.
I'm one of the graphite maintainers and love to graphite all the things. If I get a bit more free time I can implement this myself, otherwise feel free to beat me to it.
It is pretty heavily used in the web / startup industry and seems worth supporting in addition to services like librato / new relic / etc.
Hi,
I evaluating load balancing solution on mesos, especially, aurora. I'm using grpc. My question is simple: Does aurproxy support http 2?
Example session below, the version of golang in Debian Jessie doesn't understand the newer syntax. Using a newer version of golang works.
Step 6 : RUN mkdir -p $GOPATH && go get github.com/buger/gor && cd $GOPATH/src/github.com/buger/gor && go build
---> Running in 9be8e9012659
# github.com/araddon/gou
/opt/go/src/github.com/araddon/gou/testutil.go:26: syntax error: unexpected range, expecting {
/opt/go/src/github.com/araddon/gou/testutil.go:34: non-declaration statement outside function body
/opt/go/src/github.com/araddon/gou/testutil.go:35: non-declaration statement outside function body
/opt/go/src/github.com/araddon/gou/testutil.go:36: syntax error: unexpected }
INFO[0177] The command [/bin/sh -c mkdir -p $GOPATH && go get github.com/buger/gor && cd $GOPATH/src/github.com/buger/gor && go build] returned a non-zero code: 2
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.