01-15-2019
Hello,
Long time passed. I have come across the same problem definition at another board.
Quote:
I am a web developer, recently a need has been created to use Load Balancer. I am new in this area. I have chosen which LB to use, its not like it matters so much, HAProxy has all the features needed for as far as I've researched.
My concern is that, with software based load balancer, It does not "redirect" user to the backend server, the loadbalancer stays in the middle, so all the traffic bandwith and tcp connections, will stay in the middle. Did I get it right?
If yes for the question before, then how can I make a solution so the load balancer will not stay in the middle with Client - Backend server?
Also, I need a "source" lb type, because webapp uses session, and I need users to connect to the same servers they've been using.
Thank you in advance.
So, the final question is: How to redirect a request to another ip
address:port
Normally in current configuration it forwards incoming requests, not redirecting. So it cause 2x traffic.
Keep searching..
Kind regards
Boris
9 More Discussions You Might Find Interesting
1. AIX
Hi,
how can I find out how many memory (physical and virtual) a thread uses at the moment? I know how to find out the Thread-ID, but not how to monitor it...
We use AIX 4.3.3 at th emoment.
Please help, I am stuck :confused: !! (0 Replies)
Discussion started by: Fong
0 Replies
2. UNIX for Advanced & Expert Users
Hello experts,
I am writing an application in Solaris, which is supposed to work on PrimePower 650 and SunFire 440 machines. The application listens to the events raised by the Hardware and OS in /dev/log. The application listens to the messages logged into /dev/log and do some processing on... (3 Replies)
Discussion started by: pleaseteachmeun
3 Replies
3. Shell Programming and Scripting
hi,
i hav a script which processes 1000 files one by one in every run jus for searching their corresponding output files at a given path, due to this my script runs for long time and taking more CPU,
can we have any way in which we can have this check at least 100 files in a single shot... (5 Replies)
Discussion started by: Prateek007
5 Replies
4. Solaris
We have Sun OS running on spark :
SunOS ciniwnpr67 5.10 Generic_118833-24 sun4u sparc SUNW,Sun-Fire-V440
Having Physical RAM :
Sol10box # prtconf | grep Mem
Memory size: 8192 Megabytes
My Top Output is :
130 processes: 129 sleeping, 1 on cpu
CPU states: 98.8% idle, 0.2% user, 1.0%... (27 Replies)
Discussion started by: rajwinder
27 Replies
5. AIX
Hi,
I have a problem with memory on AIX 5.3. On this server, we have JDE Edwards (ERP) and Oracle Database (9.2.0.7.0).
We have 4 Gb for physical memory and 3 Gb for paging space.
When I stop all services (JDE, Oracle and all other services), the physical memory is not free (4 Gb)
svmon... (9 Replies)
Discussion started by: tagger
9 Replies
6. IP Networking
Hi,
I am involved in a project on Debian. One of my requirement is to route an IP packet in my application to a proxy server and receive the reply from the proxy server as an IP packet. My application handles data at the IP frame level. My application creates an IP packet(with all the necessary... (0 Replies)
Discussion started by: Rajesh_BK
0 Replies
7. UNIX Desktop Questions & Answers
Hi All
I am new to UNIX ,can any one please help in finding MEMORY CONSUMPTION of VLC when i use it as Streaming Server.
I need to log the memory consumption for atleast 10 hours.
Can any one help me in finding this Please (1 Reply)
Discussion started by: ravikanth17
1 Replies
8. IP Networking
I need to configure a proxy on my local machine to use an upstream proxy (installed on another machine). The upstream proxy requires Digest/NTLM authorization. I want the local proxy to deal with the upstream proxy's authorization details and provides authorization free access to users that connect... (0 Replies)
Discussion started by: Russel
0 Replies
9. Shell Programming and Scripting
Hello folks; I'm trying to write a script to test our proxy servers to see if they're passing traffic and i need help please. I wrote this code below to implement "httpie" tool but still having issues. Can someone please take a look and let me know what's wrong with this code? The code is supposed... (2 Replies)
Discussion started by: Katkota
2 Replies
LEARN ABOUT DEBIAN
perlbal::manual::loadbalancer
Perlbal::Manual::LoadBalancer(3pm) User Contributed Perl Documentation Perlbal::Manual::LoadBalancer(3pm)
NAME
Perlbal::Manual::LoadBalancer - Using Perlbal as a Load Balancer
VERSION
Perlbal 1.78.
DESCRIPTION
How to configure a Perlbal Load Balancing service.
READ ME FIRST
Please read Perlbal::Manual::Configuration first for a better explanation on how to configure Perlbal. This document will make much more
sense after reading that.
Using Perlbal as a Load Balancer
For a better understanding of how to set up Perbal as a Load Balancer, it should be noted that a Load Balancer and a Reverse Proxy can
often be the same thing; not always, but often.
A Load Balancer is a server (or device) that balances requests across a number of servers to spread the load. A Reverse Proxy can still do
this but also have a number of other features.
Perlbal as a Reverse Proxy provides features such as buffering content, preserving connections to the backend servers, starting connections
ahead of time and a high priority queue, among others.
You could almost say that a Load Balancer is a subset of a Reverse Proxy (it's not, but you could).
When it comes to Perlbal, the Load Balancer is implemented as a Reverse Proxy without all the extra options, and that's why you set the
role of a Load Balancer to "reverse_proxy":
SET role = reverse_proxy
Simple load balancing
Let's assume you want to configure two machines to serve your website and you want to let Perlbal decide how to balance the requests. For
the sake of this exercise let's assume you have two servers at:
10.0.0.1:80
10.0.0.2:80
And now you want to use these two machines to serve your website at:
10.0.0.3:80
Here's a sample configuration to make this happen:
CREATE POOL mywebsite
POOL mywebsite ADD 10.0.0.1:80
POOL mywebsite ADD 10.0.0.2:80
CREATE SERVICE service_mywebsite
SET role = reverse_proxy
SET pool = mywebsite
SET listen = 10.0.0.3:80
ENABLE service_mywebsite
The first line defines a pool of machines called "mywebsite". The second and third lines add your two machines to that pool (note that the
indentation is not mandatory).
After that you define a service called "service_mywebsite" with the role "reverse_proxy" set to listen on "10.0.0.3:80" and using the pool
"mywebsite" to serve the requests.
The last line is what allows you have several services configured in a file even if they are not currently active (a common scenario is to
configure everything on the file and then enable/disable services on-the-fly as required; see Perlbal::Manual::Management for more
information on this process).
The Load Balancing algorithm
Perlbal uses a highly efficient load balancing algorithm. It is very effective for distributing dynamic web requests among potentially
heterogeneous hardware.
First, backend servers must have their MaxClients (for apache, or equivalent) setting tuned to a reasonable limit. If your hardware can run
20 requests in parallel before running out of CPU, set MaxClients to 20.
Next, by default Perlbal will distribute requests randomly. Opening a new connection to any available backend, and issuing the request.
The proper algorithm is able to be used if "verify_backend", "backend_persist", "backend_persist_cache", and "connect_ahead" are enabled.
SET persist_backend = on
SET verify_backend = on
SET backend_persist_cache = 5
SET connect_ahead = 2
In this configuration, Perlbal will only route client requests to backends that it knows are real processes, instead of the OS listen
queue. It will attempt to reuse pre-verified backends, and will attempt to create slightly more idle connections than it needs in
preparation of future requests.
When you put all this together, it becomes less likely that a client will wait for Perlbal to find an available backend. By setting your
MaxClients properly, backends are able to serve traffic without getting overwhelmed. If no backends are available, Perlbal will queue them
internally, rather than overload backends.
You would want to disable "verify_backend" if you are balancing across image servers, or other extremely lightweight requests.
SEE ALSO
Perlbal::Manual::Configuration, Perlbal::Manual::FailOver, Perlbal::Manual::Management, Perlbal::Manual::ReverseProxy.
perl v5.14.2 2011-01-23 Perlbal::Manual::LoadBalancer(3pm)