Solved

running more Squid daemons

Posted on 2002-07-19
9
335 Views
Last Modified: 2013-12-15
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
Comment
Question by:gt3
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 4
  • 3
  • 2
9 Comments
 
LVL 51

Expert Comment

by:ahoffmann
ID: 7164285
.. and what is your loadbalancer for?
0
 

Author Comment

by:gt3
ID: 7164838
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
 
LVL 51

Expert Comment

by:ahoffmann
ID: 7164938
why using squid (application level), when NAT can be used (in your router, firewall, packetfilter). Would be much more efficient.
0
Why Off-Site Backups Are The Only Way To Go

You are probably backing up your data—but how and where? Ransomware is on the rise and there are variants that specifically target backups. Read on to discover why off-site is the way to go.

 

Author Comment

by:gt3
ID: 7165145
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
 
LVL 51

Expert Comment

by:ahoffmann
ID: 7165199
iptables can do that kind of NAT
I don't know about Cisco, but it should also do source-NAT and destination-NAT.
0
 
LVL 15

Accepted Solution

by:
samri earned 100 total points
ID: 7167760
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
 
LVL 51

Expert Comment

by:ahoffmann
ID: 7167767
> .. 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
 
LVL 15

Expert Comment

by:samri
ID: 7167930
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
 

Author Comment

by:gt3
ID: 7177333
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

Enterprise Mobility and BYOD For Dummies

Like “For Dummies” books, you can read this in whatever order you choose and learn about mobility and BYOD; and how to put a competitive mobile infrastructure in place. Developed for SMBs and large enterprises alike, you will find helpful use cases, planning, and implementation.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Fine Tune your automatic Updates for Ubuntu / Debian
Google Drive is extremely cheap offsite storage, and it's even possible to get extra storage for free for two years.  You can use the free account 15GB, and if you have an Android device..when you install Google Drive for the first time it will give…
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.
How to Install VMware Tools in Red Hat Enterprise Linux 6.4 (RHEL 6.4) Step-by-Step Tutorial
Suggested Courses

624 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question