Hello,
I would like to know how nuster works with haproxy? You do not mention it in your doc on github.
We have a haproxy for loadbalancing and we would also like to have a cache without having to install an apache. We have JavaEE middleware applications tomcat / wildfly.
Does Haproxy and Nuster work together? Do you have a doc? Haproxy listens on the: 80 and nuster on the: 8080 we have keepalived in frontend to make high availability haproxy level.
You don't need haproxy and nuster work together. You can use nuster as a http loadbalancer just like haproxy as nuster is built on top of haproxy and inherits all features of HAProxy, it's 100% compatible with HAProxy.
So suppose you have haproxy in /usr/local/bin/haproxy and haproxy conf in /etc/haproxy/haproxy.conf.
What you need to do is to install nuster, say /usr/local/nuster/bin/haproxy. And if you run /usr/local/nuster/bin/haproxy -f /etc/haproxy/haproxy.conf, nuster will work just like haproxy.
In order to enable cache, update /etc/haproxy/haproxy.conf this way:
Add nuster cache on into global section, and nuster cache on and some rules nuster rule into backend section
So your /etc/haproxy/haproxy.conf looks like this:
global
# your original conf here
# add this:
nuster cache on data-size 1g
#....
frontend your-original-frontend
bind *:80 #
mode http
#...
backend your-original-tomcat-backend
mode http
# add following two lines
nuster cache on
nuster rule all ttl 0
# end here
server your-tomcat-server tomcat-ip:tomcat-port
Then kill original haproxy process, and start nuster: /usr/local/nuster/bin/haproxy -f /etc/haproxy/haproxy.conf
Thank's a lot for your reply, J like what I see :)
Can you tell me which section you put the stats tag:
nuster cache on uri / nuster / cache
is it the same as the haproxy stats I guess not?
I would like to do surveys with and without nuster, to see the differences and thus convince of the good choice of nuster! Again thank you, I hope that Nuster has a nice day ahead of him :)
What exactly does "based on HAProxy" mean? Built with the same purpose of HAProxy in mind, is it a fork? Curious to how you decided to improve upon it. Looks impressive, might have to give it a try myself.
nuster uses the source code from HAProxy and added cache functionality on top of it. nuster is not built with the same purpose of HAProxy, but with the powerful features of HAProxy, like load balacing/ACL.
nuster started from HAProxy v1.7 when there was no small cache ability in haproxy, which was introduced in haproxy v1.8.
But the cache introduced in haproxy1.8 has many limitations, for example only small response can be cached, which defaults to 16KB as defined by the global parameter tune.bufsize, while nuster can cache any size response.
Also haproxy1.8 cache only works for 200 and GET, while nuster can cache any http code and POST/PUT.
Also haproxy1.8 cache can only use host and urias key, while nuster can use header, cookie, query as key too.
And nuster has PURGE functionalities, disable/enable at runtime functionalities, stats, and so on.
Please do give it a try, any feedback is welcomed:)
I'm running Haproxy on CentOS 7.6.1810, I'd give a try to nuster but I can't figure out how to install it.
Is there an rpm or something cause buiding always fails with lua versions and missing dependencies default lua version is 5.1.4.
Hello,
I would like to know how nuster works with haproxy? You do not mention it in your doc on github.
We have a haproxy for loadbalancing and we would also like to have a cache without having to install an apache. We have JavaEE middleware applications tomcat / wildfly.
Does Haproxy and Nuster work together? Do you have a doc? Haproxy listens on the: 80 and nuster on the: 8080 we have keepalived in frontend to make high availability haproxy level.
thank you in advance for the answer.
Patrick.
Hi,
You don't need haproxy and nuster work together. You can use nuster as a http loadbalancer just like haproxy as nuster is built on top of haproxy and inherits all features of HAProxy, it's 100% compatible with HAProxy.
So suppose you have haproxy in
/usr/local/bin/haproxyand haproxy conf in/etc/haproxy/haproxy.conf.What you need to do is to install nuster, say
/usr/local/nuster/bin/haproxy. And if you run/usr/local/nuster/bin/haproxy -f /etc/haproxy/haproxy.conf, nuster will work just like haproxy.In order to enable cache, update
/etc/haproxy/haproxy.confthis way:Add
nuster cache onintoglobalsection, andnuster cache onand some rulesnuster ruleintobackendsectionSo your
/etc/haproxy/haproxy.conflooks like this:Then kill original haproxy process, and start nuster:
/usr/local/nuster/bin/haproxy -f /etc/haproxy/haproxy.confThat's it.
Thank's a lot for your reply, J like what I see :)
Can you tell me which section you put the stats tag:
nuster cache on uri / nuster / cache
is it the same as the haproxy stats I guess not?
I would like to do surveys with and without nuster, to see the differences and thus convince of the good choice of nuster! Again thank you, I hope that Nuster has a nice day ahead of him :)
Hi, you should put it in
globalsection,It's not haproxy stats(web page nor cli), you can get the stats using
curl http://127.0.0.1[:port]/_any/path/would/do.I forgot something ?
How to configure port for stats view, because frontend listen on port 80 :/
Hi,
I have a problem with java EE application who start on tomcat. when I login on after I want to logout, the session stay open.
My nuster config :
any idee ? Thank's a lot
Patrick.
Hi,
maybe you should cache certain page instead of all
nuster rule all ttl 0What exactly does "based on HAProxy" mean? Built with the same purpose of HAProxy in mind, is it a fork? Curious to how you decided to improve upon it. Looks impressive, might have to give it a try myself.
nuster uses the source code from HAProxy and added cache functionality on top of it. nuster is not built with the same purpose of HAProxy, but with the powerful features of HAProxy, like load balacing/ACL.
nuster started from HAProxy v1.7 when there was no small cache ability in haproxy, which was introduced in haproxy v1.8.
But the cache introduced in haproxy1.8 has many limitations, for example only small response can be cached, which defaults to 16KB as defined by the global parameter tune.bufsize, while nuster can cache any size response.
Also haproxy1.8 cache only works for 200 and GET, while nuster can cache any http code and POST/PUT.
Also haproxy1.8 cache can only use host and urias key, while nuster can use header, cookie, query as key too.
And nuster has PURGE functionalities, disable/enable at runtime functionalities, stats, and so on.
Please do give it a try, any feedback is welcomed:)
Hi,
I'm running Haproxy on CentOS 7.6.1810, I'd give a try to nuster but I can't figure out how to install it.
Is there an rpm or something cause buiding always fails with lua versions and missing dependencies default lua version is 5.1.4.
Hi,
You can build without lua, just omit lua related parameters when you make nuster.
Or you can install lua manually, for example, you can refer to
gist.github.com/drpauldixon/b75a33...