Go Premium for a chance to win a PS4. Enter to Win

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 342
  • Last Modified:

running more Squid daemons

Hi,

we will get new external IP Adresses. So we have a
Loadbalancer with 10 Webserver and 3 Application Server
who separate the ext. Netw. and int. Network (DMZ).

But all our Customer cannot reorganice to the new IP Adresse at the same time.

So I must redirect http request to the old IP Adresses.
in two direction.

My Idea was Squid to solve the Problem, but Squid can
this only with one IP Adress. but i have more virtual IP Adresses on both NIC´s.

The solution of the Problem is,run more Instance (daemons)of Squid (I think).

If I try to run more daemons, the answer from Squid is that Squid already running.

Do you know, to run more Squid daemons or have you an other Idea to solve the problem ?

Many

Thanks

Michael


 
0
gt3
Asked:
gt3
  • 4
  • 3
  • 2
1 Solution
 
ahoffmannCommented:
.. and what is your loadbalancer for?
0
 
gt3Author Commented:
ext. Network -> loadbalancer -> (DMZ)Webserver
-> internal Network

loadbalancing between one IP Adresse and
for example 3 Webservers

In the future the loadbalancer (F5 Networks) have the new IP Adresses and the old IP Adresses.
The squid will be in front of the loadbalancer.
All http request to the old IP Adresses should be processed by squid.

squid 2.4 Stable7 - Redhat Linux 7.2

www.squid-cache.org

0
 
ahoffmannCommented:
why using squid (application level), when NAT can be used (in your router, firewall, packetfilter). Would be much more efficient.
0
VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

 
gt3Author Commented:
The Problem is:

The request comes to the "old IP Adress"
but the answer from Webserver (loadbalancer)
will be come from the new "IP Adress".


I don´t know how to resolve this with NAT.
I think it will be going with NAT in one way,
but not both ways.

We have to Cisco Pixes (Failover) in Action.


0
 
ahoffmannCommented:
iptables can do that kind of NAT
I don't know about Cisco, but it should also do source-NAT and destination-NAT.
0
 
samriCommented:
gt3,

I would believe utilizing the Loadbalancer or the Firewall NAT/Redirector (like Ahoffman's recommende) would be much efficient.

However, if you insist on using Squid, maybe you could get each of the squid instance to bind to a different IP (virtual) address.

Personally I have done this before (prev employer) and it worked quite well.  However, maintaining a bunch of squid process on a machine is a bit headache.  Imagine having 10 process using "squid" name, and determining which one is which squid is not fun.  What I ended up is renaming the squid to squid-aa, squid-bb...so forth.  Not much fun, but it works.

There is a detail configuration documentation from Visolve;

http://squid.visolve.com/squid24s1/contents.htm

Specific to my recommendation.
http://squid.visolve.com/squid24s1/network.htm

-- some excerpt.
http_port

Usage
http_port port
hostname: port
1.2.3.4 : port

Description
This tag name is used to specify the socket addresses where Squid will listen for HTTP client requests. Multiple socket addresses can be specified. There are three forms: port alone, hostname with port, and IP address with port. If hostname or IP address is specified, then Squid binds the socket to that specific address. This replaces the old "tcp_incoming_address" option. Most likely, there is no
need to bind to a specific address, so the port number alone can be used. If Squid is to be run in accelerator mode, then it should listen on port 80 also, or instead.
--------------
Hope this helps.
0
 
ahoffmannCommented:
> .. determining which one is which squid is not fun.
very simple, use:
   /usr/sbin/squid -f /etc/squid/ip1.conf
   /usr/sbin/squid -f /etc/squid/ip2.conf
   ...
(also solves the problem to find the currently used conf file:)
0
 
samriCommented:
ahoffman,

hmm.. that will work since the full cmdline would appear in "ps" output. :)  I wished you post this (or I ask) three year back. thanks.

anyway, gt3: what did you decided to work on?

0
 
gt3Author Commented:
Hi,

i´m sorry i answered so late.

I have compiled the squid with the follow option:

./configure --prefix /usr/local/squid1
make all
make install

./configure --prefix /usr/local/squid2
make all
make install

so i started it, with absolute path:

/usr/local/squid1/squid
/usr/local/squid2/squid

and both running.

With the -f option, you can decide
which config file squid use, but only
one daemon will be running.
0

Featured Post

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

  • 4
  • 3
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now