[squid-users] Re: Web server acceleration with squid and clustering with high availability

From: Forse <forsekun@dont-contact.us>
Date: Sun, 7 Jan 2007 16:00:06 +0200

Oops I forgot to include my squid.conf

--- squid.conf starts ---

http_port XXX.XXX.XXX.XXX:80 defaultsite=www.something.com vhost
icp_port 0
htcp_port 0
udp_incoming_address 0.0.0.0
udp_outgoing_address 255.255.255.255
cache_peer 127.0.0.1 Parent 80 0 no-query originserver
icp_query_timeout 0
maximum_icp_query_timeout 2000
mcast_icp_query_timeout 2000
dead_peer_timeout 10 seconds
hierarchy_stoplist cgi-bin
hierarchy_stoplist ?
cache Deny QUERY
cache_vary on
cache_mem 104857600 bytes
cache_swap_low 95
cache_swap_high 97
maximum_object_size 256000000 bytes
minimum_object_size 0 bytes
maximum_object_size_in_memory 5120000 bytes
ipcache_size 1024
ipcache_low 90
ipcache_high 95
fqdncache_size 1024
cache_replacement_policy heap LFUDA
memory_replacement_policy heap GDSF
cache_dir diskd /var/spool/squid/diskd 5120 13 256 Q1=64 Q2=72
cache_dir coss /var/spool/squid/squid.coss1 1000 block-size=512
overwrite-percent=0% max-stripe-waste=131072 membufs=15 MB
maxfullbufs=1000 MB max-size=131072
cache_dir coss /var/spool/squid/squid.coss2 1000 block-size=512
overwrite-percent=0% max-stripe-waste=131072 membufs=15 MB
maxfullbufs=1000 MB max-size=131072
access_log /var/log/squid/access.log
cache_log /var/log/squid/cache.log
cache_store_log none
cache_swap_log /var/spool/squid/%s
emulate_httpd_log off
log_ip_on_direct on
mime_table /usr/share/squid/mime.conf
log_mime_hdrs off
pid_filename /var/run/squid.pid
debug_options ALL,1
log_fqdn off
client_netmask 255.255.255.255
ftp_user VOID
ftp_list_width 40
ftp_passive off
ftp_sanitycheck on
ftp_telnet_protocol on
check_hostnames on
allow_underscore on
dns_retransmit_interval 5 seconds
dns_timeout 120 seconds
dns_defnames off
hosts_file /etc/hosts
diskd_program /usr/lib/squid/diskd-daemon
unlinkd_program /usr/lib/squid/unlinkd
url_rewrite_children 10
url_rewrite_concurrency 0
url_rewrite_host_header off
location_rewrite_children 5
location_rewrite_concurrency 0
auth_param basic
auth_param basic realm Squid proxy-caching web server
auth_param basic children 5
auth_param basic concurrency 0
auth_param basic credentialsttl 7200 seconds
auth_param basic casesensitive off
auth_param basic blankpassword off
authenticate_cache_garbage_interval 3600 seconds
authenticate_ttl 3600 seconds
authenticate_ip_ttl 0 seconds
wais_relay_port 0
request_header_max_size 20480 bytes
request_body_max_size 0 bytes
refresh_pattern . 0 20% 4320
 ignore-reload
quick_abort_min 5000 KB
quick_abort_max 5000 KB
quick_abort_pct 60
read_ahead_gap 16384 bytes
negative_ttl 15 seconds
positive_dns_ttl 21600 seconds
negative_dns_ttl 60 seconds
range_offset_limit 0 bytes
collapsed_forwarding on
refresh_stale_hit 0 seconds
forward_timeout 240 seconds
connect_timeout 60 seconds
peer_connect_timeout 30 seconds
read_timeout 600 seconds
request_timeout 180 seconds
persistent_request_timeout 30 seconds
client_lifetime 600 seconds
half_closed_clients off
pconn_timeout 120 seconds
ident_timeout 10 seconds
shutdown_lifetime 10 seconds
acl QUERY urlpath_regex cgi-bin
acl QUERY urlpath_regex \?
acl all src 0.0.0.0/0.0.0.0
acl manager proto cache_object
acl localhost src 127.0.0.1
acl web_ports port 80
acl purge method PURGE
acl SSL_ports port 443
acl SSL_ports port 563
acl Safe_ports port 80
acl Safe_ports port 21
acl Safe_ports port 443
acl Safe_ports port 563
acl Safe_ports port 70
acl Safe_ports port 210
acl Safe_ports port 1025-65535
acl Safe_ports port 280
acl Safe_ports port 488
acl Safe_ports port 591
acl Safe_ports port 777
acl Safe_ports port 901
http_access Allow web_ports
http_access Allow manager !localhost
http_access Deny manager
http_access Allow purge localhost
http_access Deny purge
http_access Deny all
http_reply_access Allow all
icp_access Deny all
htcp_access Deny all
htcp_clr_access Deny all
ident_lookup_access Deny all
reply_header_max_size 20480 bytes
reply_body_max_size 0 Allow all
cache_mgr root@something.com
mail_program mail
cache_effective_user proxy
httpd_suppress_version_string off
visible_hostname none
umask 23
announce_period 31536000 seconds
announce_host tracker.ircache.net
announce_port 3131
httpd_accel_no_pmtu_disc off
dns_testnames netscape.com
dns_testnames internic.net
dns_testnames nlanr.net
dns_testnames microsoft.com
logfile_rotate 0
tcp_recv_bufsize 0 bytes
err_html_text
memory_pools on
memory_pools_limit 5242880 bytes
via on
forwarded_for on
log_icp_queries on
icp_hit_stale off
minimum_direct_hops 4
minimum_direct_rtt 400
cachemgr_passwd XXXXXXXXXX info stats/objects shutdown config offline_toggle
store_avg_object_size 13 KB
store_objects_per_bucket 20
client_db off
netdb_low 900
netdb_high 1000
netdb_ping_period 300 seconds
query_icmp off
test_reachability off
buffered_logs off
reload_into_ims off
icon_directory /usr/share/squid/icons
global_internal_static on
short_icon_urls off
error_directory /usr/share/squid/errors/English
maximum_single_addr_tries 1
retry_on_error off
snmp_port 0
snmp_access Deny all
snmp_incoming_address 0.0.0.0
snmp_outgoing_address 255.255.255.255
as_whois_server whois.ra.net
wccp_router 0.0.0.0
wccp_version 4
wccp2_rebuild_wait on
wccp2_forwarding_method 1
wccp2_return_method 1
wccp2_assignment_method 1
wccp2_service standard 0wccp2_weight 10000
wccp_address 0.0.0.0
wccp2_address 0.0.0.0
delay_pools 0
delay_initial_bucket_level 50
incoming_icp_average 6
incoming_http_average 4
incoming_dns_average 4
min_icp_poll_cnt 8
min_dns_poll_cnt 8
min_http_poll_cnt 8
max_open_disk_fds 0
offline_mode off
uri_whitespace strip
nonhierarchical_direct on
prefer_direct off
strip_query_terms on
coredump_dir /var/cache/squid
redirector_bypass off
ignore_unknown_nameservers on
digest_generation on
digest_bits_per_entry 5
digest_rebuild_period 3600 seconds
digest_rewrite_period 3600 seconds
digest_swapout_chunk_size 4096 bytes
digest_rebuild_chunk_percentage 10
client_persistent_connections on
server_persistent_connections on
persistent_connection_after_error off
detect_broken_pconn off
balance_on_multiple_ip on
pipeline_prefetch off
request_entities off
high_response_time_warning 0
high_page_fault_warning 0
high_memory_warning 0 bytes
store_dir_select_algorithm least-load
ie_refresh off
vary_ignore_expire off
sleep_after_fork 0
minimum_expiry_time 60 seconds
relaxed_header_parser on

--- squid.conf ends ---

On 1/7/07, Forse <forsekun@gmail.com> wrote:
> Hello fellow squid users
>
> I only recently discovered squid accelerator features and I
> implemented it on my web server about 2-3 month ago. My web site
> consists of dynamic content (php) and serves some media files (radio
> shows in mp3 format and video trailers).
>
> My web server (Apache2) is bind to 127.0.0.1:80 while my squid
> accelerator (version 2.6.5) is bind to external IP and port 80.
> Everything works just fine, but recently my web site is maxing out
> server's 20mbit line and I purchased VPS server (virtual private
> server) running on 100mbit line so I would like to install squid there
> and make it serve only media content.
> So to make this shorter this is what I am trying to accomplish:
>
> o Setup squid 1 (one that is running on same machine as web server) so
> it uses squid2 (one on VPS) as sibling and forwards all media requests
> to it.
> o Squid2 in turn will fetch media content when asked from squid1 and
> then serve it from own cache
> o Squid1 monitors squid2 and if it goes down will serve media requests
> itself until squid2 comes back online.
>
> In future I want to purchase more VPS servers and create a little
> cluster where squid1 acts as main node and uses round robin to kind of
> load balance server load.
> Things to note:
>
> o My web server serves more than one website (configured to run in
> virtual host mode).
> o Both servers (web server and VPS) are running Debian unstable and
> identical versions of squid (2.6.5).
> o I know there will probably be added latency due to squid forwarding
> requests, but main reason for me to do this is to serve media files
> from 100Mbit pipe.
> o My squid server currently uses 2 coss cache_dir and one diskd cache_dir.
> o VPS has 512MB ram while web server has about 4Gig. Both servers run
> on powerful hardware (dual Xeons with SCSI disks).
>
>
> I have attached my main squid configuration with this email. I would
> appreciate any feedback or suggestions on this subject and would like
> to thank you for your time.
>
> P.S. I searched for answer to this everywhere on the web, but so
> far…nothing so I really hope this email will at least get my started
> or pointed in right direction.
>

-- 
-----
T:Forse
Received on Sun Jan 07 2007 - 07:00:11 MST

This archive was generated by hypermail pre-2.1.9 : Thu Feb 01 2007 - 12:00:01 MST