These are chat archives for xkr47/vhostproxy4

19th
Jan 2016
Grant Haywood
@cinterloper
Jan 19 2016 17:39
As a fan of haproxy, may I ask what feature set you intend on shooting for in your proxy?
Jonas Berlin
@xkr47
Jan 19 2016 17:39
hi
Grant Haywood
@cinterloper
Jan 19 2016 17:39
hey there
Jonas Berlin
@xkr47
Jan 19 2016 17:40
I don't recall haproxy's feature set
anyway
Grant Haywood
@cinterloper
Jan 19 2016 17:42
well, its basicly a load balancer with http header inspection, and routing based on (....).
Forgetting haproxy, what do you see as the scope of what you are trying to do?
Jonas Berlin
@xkr47
Jan 19 2016 17:42
the purpose of this one is to serve as a HTTPS/HTTP reverse proxy for multiple servers running elsewhere
so I will configure it to, based on hostname forward requests to another server, based on configured rules
it also performs some logging of requests and can force-upgrade to https on a hostname basis
Grant Haywood
@cinterloper
Jan 19 2016 17:46

are the rules a configuration spec of your construction?
or a lambda/handler that decides how to route the request?

are you interested in persueing health checks and hot configuration changes?

Jonas Berlin
@xkr47
Jan 19 2016 17:48
a sec
4 lines later there is a resolveNextHop() which can of course be replaced with whatever logic you want
now it just looks up it from the map
Jonas Berlin
@xkr47
Jan 19 2016 17:53
the whole thing is really basic at this point and you could customize it in pretty much any direction you want
hot configuration changes - sure
health checks - I have not planned that at the moment
I might move the configuration to external files at some point, with yaml or json format or something
now I'm still concentrating on making it robust
I will also try to integrate letsencrypt auto-renewal of certificates at some point
Grant Haywood
@cinterloper
Jan 19 2016 17:57
ah ok, i see. thanks for the project
https://cbonte.github.io/haproxy-dconv/configuration-1.6.html#7.2
here is an example of an existing/mature configuration language, that does a similar task. not advocating it as better, but its a feature set available in a similar program that i use.
haproxy now supports lua scripting, which i think is interesting, because its a scripting language on a reactive event loop (familure?)
Jonas Berlin
@xkr47
Jan 19 2016 17:58
:)
so how did you find this project?
I just pushed it to github like 30 minutes ago :)
Grant Haywood
@cinterloper
Jan 19 2016 17:59
dont know yet. need to try it, but i saw it on my github feed lol
i closely follow
https://github.com/magneticio/vamp-router
and develop (pretty messy and unfinshed)
https://github.com/cinterloper/txhaproxy
i have a similar use case to vamp.io
Jonas Berlin
@xkr47
Jan 19 2016 17:59
github feed? where is it ?
Grant Haywood
@cinterloper
Jan 19 2016 18:00
Julien starred it (in the chat), and i think i follow him.
Jonas Berlin
@xkr47
Jan 19 2016 18:01
hehe
yeah
he asked me to push it
I'm not planning on putting a huge lot of features into my proxy
that vamp-router looks like it has everything :)
Grant Haywood
@cinterloper
Jan 19 2016 18:09
sort of, except they kind of depricated it
also
mportant: : Currently, Vamp-router does NOT check validity of the HAproxy command, ACLs and configs submitted to it. Submitting a config where a frontend references a non-existing backend will be accepted by the REST api but crash HAproxy.
which is terriable
my version will make sure haproxy reloads cleanly, or roll it back
but, i would prefer a vertx solution
Jonas Berlin
@xkr47
Jan 19 2016 18:30
hehe