[squid-users] squid 3.5.24 HTTPS/HTTP caching optimisation Help

--Ahmad-- ahmed.zaeem at netstream.ps
Mon Jun 5 10:08:12 UTC 2017


Hola Folks .
i have been trying to optimise caching website that is http and has many images in its content like cnn.com <http://cnn.com/>
and trying to cache https static website like https://www.alwatanvoice.com <https://www.alwatanvoice.com/>


i have squid enabled with https and i installed certificates on clients pcs :

i have  been fighting to have better HIT ration but it is vey poor .
i hope someone give me a hand and focous on caching images contents of the 2 websites below .

here is what i have in my config file :



########################################
visible_hostname V6Proxies

#
# Recommended minimum configuration:
#

# Example rule allowing access from your local networks.
# Adapt to list your (internal) IP networks from where browsing
# should be allowed
acl localnet src 10.0.0.0/8	# RFC1918 possible internal network
acl localnet src 172.16.0.0/12	# RFC1918 possible internal network
acl localnet src 192.168.0.0/16	# RFC1918 possible internal network
acl localnet src fc00::/7       # RFC 4193 local private network range
acl localnet src fe80::/10      # RFC 4291 link-local (directly plugged) machines

acl SSL_ports port 443
acl Safe_ports port 80		# http
acl Safe_ports port 21		# ftp
acl Safe_ports port 443		# https
acl Safe_ports port 70		# gopher
acl Safe_ports port 210		# wais
acl Safe_ports port 1025-65535	# unregistered ports
acl Safe_ports port 280		# http-mgmt
acl Safe_ports port 488		# gss-http
acl Safe_ports port 591		# filemaker
acl Safe_ports port 777		# multiling http
acl CONNECT method CONNECT
cache_mgr a at a
cachemgr_passwd a all
http_access allow localnet manager
#
# Recommended minimum Access Permission configuration:
#
# Deny requests to certain unsafe ports
http_access deny !Safe_ports

# Deny CONNECT to other than secure SSL ports
http_access deny CONNECT !SSL_ports

# Only allow cachemgr access from localhost
http_access allow localhost manager
http_access deny manager

# We strongly recommend the following be uncommented to protect innocent
# web applications running on the proxy server who think the only
# one who can access services on "localhost" is a local user
#http_access deny to_localhost

#
# INSERT YOUR OWN RULE(S) HERE TO ALLOW ACCESS FROM YOUR CLIENTS
#

# Example rule allowing access from your local networks.
# Adapt localnet in the ACL section to list your (internal) IP networks
# from where browsing should be allowed
http_access allow localnet
http_access allow localhost

# And finally deny all other access to this proxy
http_access deny all

# Squid normally listens to port 3128
http_port 3128
#######################################################################################################
https_port 3129 intercept ssl-bump generate-host-certificates=on dynamic_cert_mem_cache_size=4MB cert=/usr/local/squid/ssl_cert/myca.pem key=/usr/local/squid/ssl_cert/myca.pem
ssl_bump server-first all
sslcrtd_program /lib/squid/ssl_crtd -s /var/lib/ssl_db -M 4MB
sslcrtd_children 8 startup=1 idle=1
################################################################################################
#coredump_dir /usr/local/squid/var/cache/squid
###########################
# Uncomment and adjust the following to add a disk cache directory.
#cache_dir ufs /var/cache/squid 100 16 256

# Leave coredumps in the first cache dir
#coredump_dir /var/cache/squid

#
# Add any of your own refresh_pattern entries above these.

refresh_pattern ^http://*.cnn.com/* <http://*.cnn.com/*> 720 100% 4320
refresh_pattern ^https://*.cnn.com/* <https://*.cnn.com/*> 720 100% 4320
#############################
refresh_pattern ^http://*.alwatanvoice.com/* <http://*.alwatanvoice.com/*> 720 100% 4320
refresh_pattern ^https://*.alwatanvoice.com/* <https://*.alwatanvoice.com/*> 720 100% 4320
refresh_pattern ^ftp:		1440	20%	10080
refresh_pattern ^gopher:	1440	0%	1440
refresh_pattern -i (/cgi-bin/|\?) 0	0%	0
refresh_pattern .		0	20%	4320

http_port 3126 transparent

http_port 3128

#######################################

cache_swap_low 90
cache_swap_high 95
############################
cache_effective_user squid
cache_effective_group squid
memory_replacement_policy heap GDSF
cache_replacement_policy heap LFUDA
########################
cache_mem 5000 MB
maximum_object_size_in_memory 10 MB
#########################
logfile_rotate 2
max_filedescriptors 131072
###############################
#cache_dir ufs /root/cache3 600000 64 128
############
cache_dir aufs /var/cache/squid 600000 64 128
#######################################






Squid Cache: Version 3.5.24
Service Name: squid
configure options:  '--prefix=/usr' '--includedir=/include' '--mandir=/share/man' '--infodir=/share/info' '--sysconfdir=/etc' '--enable-cachemgr-hostname=Ahmad-Allzaeem' '--localstatedir=/var' '--libexecdir=/lib/squid' '--disable-maintainer-mode' '--disable-dependency-tracking' '--disable-silent-rules' '--srcdir=.' '--datadir=/usr/share/squid' '--sysconfdir=/etc/squid' '--mandir=/usr/share/man' '--enable-inline' '--enable-async-io=8' '--enable-storeio=ufs,aufs,diskd,rock' '--enable-removal-policies=lru,heap' '--enable-delay-pools' '--enable-cache-digests' '--enable-underscores' '--enable-icap-client' '--enable-follow-x-forwarded-for' '--enable-auth' '--enable-basic-auth-helpers=LDAP,MSNT,NCSA,PAM,SASL,SMB,YP,DB,POP3,getpwnam,squid_radius_auth,multi-domain-NTLM' '--enable-ntlm-auth-helpers=smb_lm' '--enable-digest-auth-helpers=ldap,password' '--enable-negotiate-auth-helpers=squid_kerb_auth' '--enable-esi' '--disable-translation' '--with-logdir=/var/log/squid' '--with-pidfile=/var/run/squid.pid' '--with-filedescriptors=11311072' '--with-large-files' '--with-default-user=squid' '--enable-linux-netfilter' '--enable-ltdl-convenience' '--enable-ssl' '--enable-ssl-crtd' '--enable-arp-acl' 'CXXFLAGS=-DMAXTCPLISTENPORTS=200000' '--with-openssl' '--enable-snmp' '--with-included-ltdl' '--disable-arch-native'
root at portablecloud-3010:/var/cache/squid#







Any optimisation hints ?

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.squid-cache.org/pipermail/squid-users/attachments/20170605/3f95a374/attachment-0001.html>


More information about the squid-users mailing list