Solved

running more Squid daemons

Posted on 2002-07-19
9
316 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
  • 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
 

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
Get up to 2TB FREE CLOUD per backup license!

An exclusive Black Friday offer just for Expert Exchange audience! Buy any of our top-rated backup solutions & get up to 2TB free cloud per system! Perform local & cloud backup in the same step, and restore instantly—anytime, anywhere. Grab this deal now before it disappears!

 
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

Comprehensive Backup Solutions for Microsoft

Acronis protects the complete Microsoft technology stack: Windows Server, Windows PC, laptop and Surface data; Microsoft business applications; Microsoft Hyper-V; Azure VMs; Microsoft Windows Server 2016; Microsoft Exchange 2016 and SQL Server 2016.

Join & Write a Comment

Currently, there is not an RPM package available under the RHEL/Fedora/CentOS distributions that gives you a quick and easy way to allow PHP to interface with Oracle. As a result, I have included a set of instructions on how to do this with minimal …
Join Greg Farro and Ethan Banks from Packet Pushers (http://packetpushers.net/podcast/podcasts/pq-show-93-smart-network-monitoring-paessler-sponsored/) and Greg Ross from Paessler (https://www.paessler.com/prtg) for a discussion about smart network …
Learn how to get help with Linux/Unix bash shell commands. Use help to read help documents for built in bash shell commands.: Use man to interface with the online reference manuals for shell commands.: Use man to search man pages for unknown command…
Learn how to find files with the shell using the find and locate commands. Use locate to find a needle in a haystack.: With locate, check if the file still exists.: Use find to get the actual location of the file.:

758 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

Need Help in Real-Time?

Connect with top rated Experts

21 Experts available now in Live!

Get 1:1 Help Now