Sponsor:

Server and Web Integrator
Link:
Kloxo-MR logo
6.5.0 or 7.0.0
Click for "How to install"
Donation/Sponsorship:
Kloxo-MR is open-source.
Donate and or Sponsorship always welcome.
Click to:
Click Here
Please login or register. 2024-03-29, 02:13:57

Author Topic: [6.5.1.a] New Web Cache Server (TrafficServer)  (Read 11182 times)

0 Members and 1 Guest are viewing this topic.

Offline MRatWork

  • Administrator
  • The Elite
  • *****
  • Posts: 15,807
  • Karma: +119/-11
  • Gender: Male
    • View Profile
    • MRatWork Forum
[6.5.1.a] New Web Cache Server (TrafficServer)
« on: 2013-10-03, 15:58:03 »
Since 6.5.1.a-2013100302, trafficserver ready to test.

Different with varnish, trafficserver use hd space + ram combination for cache with 'default rule' where 1GB hd cache will be use 1MB RAM cache.

By default, Kloxo-MR set cache as '256MB' HD space.

Importance file inside '/etc/trafficserver':
1. storage.config - for setting hd space for cache
2. remap.config - for mapping proxy; Kloxo-MR implementing 'simple' regex_remap
3. records.config - basic configure like port, ip and etcetera

By default, trafficserver listen port 80 (also 443) and web server (apache or others listen port 8080).

At this moment, trafficserver still using 3.2.5 (latest version of 3). Version 4.0.1 already exist but I have a problem to compile to Centos 5 (no problem with Centos 6). Epel repo have version 3.0.4 for Centos 6. As I know, no 'major' repo have trafficserver (especially for Centos 5).
« Last Edit: 1970-01-01, 01:00:00 by Guest »
..:: MRatWork (Mustafa Ramadhan Projects) ::..
-- Server/Web-integrator - Web Hosting (Kloxo-MR READY!) --

Offline MRatWork

  • Administrator
  • The Elite
  • *****
  • Posts: 15,807
  • Karma: +119/-11
  • Gender: Male
    • View Profile
    • MRatWork Forum
« Last Edit: 1970-01-01, 01:00:00 by Guest »
..:: MRatWork (Mustafa Ramadhan Projects) ::..
-- Server/Web-integrator - Web Hosting (Kloxo-MR READY!) --

Offline MRatWork

  • Administrator
  • The Elite
  • *****
  • Posts: 15,807
  • Karma: +119/-11
  • Gender: Male
    • View Profile
    • MRatWork Forum
Re: [6.5.1.a] New Web Cache Server (TrafficServer)
« Reply #2 on: 2013-10-03, 16:59:34 »
Have a problem with github. Upload latest version (6.5.1.a-2013100302) always fail.
« Last Edit: 1970-01-01, 01:00:00 by Guest »
..:: MRatWork (Mustafa Ramadhan Projects) ::..
-- Server/Web-integrator - Web Hosting (Kloxo-MR READY!) --

Offline Spacedust

  • Super Grand Master
  • ****
  • Posts: 4,050
  • Karma: +1/-0
    • View Profile
Re: [6.5.1.a] New Web Cache Server (TrafficServer)
« Reply #3 on: 2013-10-04, 18:15:32 »
Apache Traffic Server takes a lot of CPU power on completely idle test server. Why ?

Code: [Select]
18408 ats       20   0 1167m 108m  32m S 105.1  0.3   5:55.95 [ET_NET 0]
16306 mysql     20   0 2357m 128m 8340 S  0.7  0.4   0:08.13 mysqld
18591 root      20   0 15176 1384  988 R  0.7  0.0   0:00.67 top
   13 root      20   0     0    0    0 S  0.3  0.0   0:02.41 ksoftirqd/1
   23 root      20   0     0    0    0 S  0.3  0.0   0:01.77 ksoftirqd/3
   38 root      20   0     0    0    0 S  0.3  0.0   0:02.42 ksoftirqd/6
   78 root      20   0     0    0    0 S  0.3  0.0   0:02.22 ksoftirqd/14
   98 root      20   0     0    0    0 S  0.3  0.0   0:00.25 kworker/13:1
 1664 root      20   0 97.7m 4320 3364 S  0.3  0.0   0:03.01 sshd
16679 root      20   0  401m  28m 8432 S  0.3  0.1   0:00.42 php
18383 nginx     20   0 95688 5568  612 S  0.3  0.0   0:00.21 nginx
18398 ats       20   0  454m  17m 2920 S  0.3  0.1   0:03.36 traffic_manager

It caches too long :/ Example I've copied file via FTP and it isn't showing inside web listing. Even pressing CTRL+F5 doesn't refresh page.
« Last Edit: 1970-01-01, 01:00:00 by Guest »

Offline MRatWork

  • Administrator
  • The Elite
  • *****
  • Posts: 15,807
  • Karma: +119/-11
  • Gender: Male
    • View Profile
    • MRatWork Forum
Re: [6.5.1.a] New Web Cache Server (TrafficServer)
« Reply #4 on: 2013-10-04, 18:42:38 »
Possible traffic_manager always work to 'monitor' something. I think it's still normal.

We don't need restart trafficserver everytime we add/update/delete domain(s).

In 4.0.1, trafficserver have new 'multithreading' model.
« Last Edit: 1970-01-01, 01:00:00 by Guest »
..:: MRatWork (Mustafa Ramadhan Projects) ::..
-- Server/Web-integrator - Web Hosting (Kloxo-MR READY!) --

Offline MRatWork

  • Administrator
  • The Elite
  • *****
  • Posts: 15,807
  • Karma: +119/-11
  • Gender: Male
    • View Profile
    • MRatWork Forum
Re: [6.5.1.a] New Web Cache Server (TrafficServer)
« Reply #5 on: 2013-10-04, 21:27:05 »
Kloxo-MR 6.5.1.a-2013100403 already use Trafficserver 4.0.1
« Last Edit: 1970-01-01, 01:00:00 by Guest »
..:: MRatWork (Mustafa Ramadhan Projects) ::..
-- Server/Web-integrator - Web Hosting (Kloxo-MR READY!) --

Offline Spacedust

  • Super Grand Master
  • ****
  • Posts: 4,050
  • Karma: +1/-0
    • View Profile
Re: [6.5.1.a] New Web Cache Server (TrafficServer)
« Reply #6 on: 2013-10-04, 21:44:10 »
Quote from: "MRatWork"
Possible traffic_manager always work to 'monitor' something. I think it's still normal.

We don't need restart trafficserver everytime we add/update/delete domain(s).

In 4.0.1, trafficserver have new 'multithreading' model.

Seems to be some Virtualbox issue. Installed on my backup server using Intel Atom D425 and it takes just 1,9%-3,6% of the CPU so not that much.

How to hide php and ATS version ?

Quote
curl -s --head http://mydomain.com/test.php
HTTP/1.1 200 OK
Server: ATS/3.2.5
Date: Fri, 04 Oct 2013 15:43:11 GMT
Content-Type: text/html
X-Powered-By: PHP/5.4.20
Cache-Control: public
Age: 0
Connection: keep-alive
« Last Edit: 1970-01-01, 01:00:00 by Guest »

Offline Spacedust

  • Super Grand Master
  • ****
  • Posts: 4,050
  • Karma: +1/-0
    • View Profile
Re: [6.5.1.a] New Web Cache Server (TrafficServer)
« Reply #7 on: 2013-10-04, 21:58:34 »
I see the TrafficServer in default configuration does not cache anything ;) I would like to set cache for 2 seconds just like my own Varnish config so in case of very big traffic about 50% hits will be going through the cache.
« Last Edit: 1970-01-01, 01:00:00 by Guest »

Offline MRatWork

  • Administrator
  • The Elite
  • *****
  • Posts: 15,807
  • Karma: +119/-11
  • Gender: Male
    • View Profile
    • MRatWork Forum
Re: [6.5.1.a] New Web Cache Server (TrafficServer)
« Reply #8 on: 2013-10-04, 22:04:04 »
Add something like 'CONFIG proxy.config.http.response_server_str STRING ATS-Hiawatha' in '/etc/trafficserver/records.config'.

You can use 'custom rule' where copy '/home/trafficserver/etc/conf/records.config' to 'custom.records.config'.
« Last Edit: 1970-01-01, 01:00:00 by Guest »
..:: MRatWork (Mustafa Ramadhan Projects) ::..
-- Server/Web-integrator - Web Hosting (Kloxo-MR READY!) --

Offline Spacedust

  • Super Grand Master
  • ****
  • Posts: 4,050
  • Karma: +1/-0
    • View Profile
Re: [6.5.1.a] New Web Cache Server (TrafficServer)
« Reply #9 on: 2013-10-04, 22:28:57 »
Thanks :)
« Last Edit: 1970-01-01, 01:00:00 by Guest »

Offline MRatWork

  • Administrator
  • The Elite
  • *****
  • Posts: 15,807
  • Karma: +119/-11
  • Gender: Male
    • View Profile
    • MRatWork Forum
Re: [6.5.1.a] New Web Cache Server (TrafficServer)
« Reply #10 on: 2013-10-04, 22:52:15 »
How to optimize trafficserver (also varnish) is not my own job. I hope user(s) find out about it and share their idea/suggest.
« Last Edit: 1970-01-01, 01:00:00 by Guest »
..:: MRatWork (Mustafa Ramadhan Projects) ::..
-- Server/Web-integrator - Web Hosting (Kloxo-MR READY!) --

Offline Spacedust

  • Super Grand Master
  • ****
  • Posts: 4,050
  • Karma: +1/-0
    • View Profile
Re: [6.5.1.a] New Web Cache Server (TrafficServer)
« Reply #11 on: 2013-10-05, 00:41:39 »
Please see my old thread about Varnish ;)

http://forum.lxcenter.org/index.php?t=msg&goto=104513&

Traffic Server seems to be less complicated, but I need a few days to test it.

Mustafa did you make any benchmarks comparing all these servers, proxies and caches :) ?

It's hard to decide which config is the best now. I think Apache Traffic Server + nginxproxy + Apache + php_fpm_event + PHP 5.4 is the best ;D
« Last Edit: 1970-01-01, 01:00:00 by Guest »

Offline Spacedust

  • Super Grand Master
  • ****
  • Posts: 4,050
  • Karma: +1/-0
    • View Profile
Re: [6.5.1.a] New Web Cache Server (TrafficServer)
« Reply #12 on: 2013-10-05, 01:22:20 »
It seems Apache Traffic Server in default config is slower than nginxproxy with default config too ;):

Code: [Select]
ab -n 50000 -c 1000 http://nowosci.org:8080/
This is ApacheBench, Version 2.3 <$Revision: 655654 $>
Copyright 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/
Licensed to The Apache Software Foundation, http://www.apache.org/

Benchmarking nowosci.org (be patient)
Completed 5000 requests
Completed 10000 requests
Completed 15000 requests
Completed 20000 requests
Completed 25000 requests
Completed 30000 requests
Completed 35000 requests
Completed 40000 requests
Completed 45000 requests
Completed 50000 requests
Finished 50000 requests


Server Software:        nginx
Server Hostname:        nowosci.org
Server Port:            8080

Document Path:          /
Document Length:        383 bytes

Concurrency Level:      1000
Time taken for tests:   6.814 seconds
Complete requests:      50000
Failed requests:        450
   (Connect: 0, Receive: 0, Length: 450, Exceptions: 0)
Write errors:           0
Non-2xx responses:      49804
Total transferred:      58477704 bytes
HTML transferred:       49086456 bytes
Requests per second:    7338.02 [#/sec] (mean)
Time per request:       136.276 [ms] (mean)
Time per request:       0.136 [ms] (mean, across all concurrent requests)
Transfer rate:          8381.07 [Kbytes/sec] received

Connection Times (ms)
              min  mean[+/-sd] median   max
Connect:       30   59  12.6     58     103
Processing:    34   76  32.6     71     444
Waiting:       21   55  17.3     52     160
Total:         77  134  33.8    131     499

Percentage of the requests served within a certain time (ms)
  50%    131
  66%    139
  75%    144
  80%    147
  90%    154
  95%    164
  98%    221
  99%    228
 100%    499 (longest request)

vs

Code: [Select]
ab -n 50000 -c 1000 http://nowosci.org/
This is ApacheBench, Version 2.3 <$Revision: 655654 $>
Copyright 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/
Licensed to The Apache Software Foundation, http://www.apache.org/

Benchmarking nowosci.org (be patient)
Completed 5000 requests
Completed 10000 requests
Completed 15000 requests
Completed 20000 requests
Completed 25000 requests
Completed 30000 requests
Completed 35000 requests
Completed 40000 requests
Completed 45000 requests
Completed 50000 requests
Finished 50000 requests


Server Software:        ATS/4.0.1
Server Hostname:        nowosci.org
Server Port:            80

Document Path:          /
Document Length:        383 bytes

Concurrency Level:      1000
Time taken for tests:   9.305 seconds
Complete requests:      50000
Failed requests:        10551
   (Connect: 0, Receive: 0, Length: 10551, Exceptions: 0)
Write errors:           0
Non-2xx responses:      39459
Total transferred:      700797554 bytes
HTML transferred:       692038427 bytes
Requests per second:    5373.66 [#/sec] (mean)
Time per request:       186.093 [ms] (mean)
Time per request:       0.186 [ms] (mean, across all concurrent requests)
Transfer rate:          73551.76 [Kbytes/sec] received

Connection Times (ms)
              min  mean[+/-sd] median   max
Connect:        0   14  48.9      6    1028
Processing:     2  170 112.6    151    1333
Waiting:        2  156 110.9    134    1188
Total:          2  184 122.5    163    1419

Percentage of the requests served within a certain time (ms)
  50%    163
  66%    203
  75%    233
  80%    252
  90%    306
  95%    366
  98%    440
  99%    525
 100%   1419 (longest request)
« Last Edit: 1970-01-01, 01:00:00 by Guest »

Offline MRatWork

  • Administrator
  • The Elite
  • *****
  • Posts: 15,807
  • Karma: +119/-11
  • Gender: Male
    • View Profile
    • MRatWork Forum
Re: [6.5.1.a] New Web Cache Server (TrafficServer)
« Reply #13 on: 2013-10-05, 01:23:08 »
I have no time to benchmarking. It's user(s) duty :D

Now, I try to make nginx, lighttpd and hiawatha use 'microcache' trick (taken from nginx idea) for better performance. Beside, implementing 'generic' permalink for nginx, lighttpd and hiawatha (latest upload of 6.5.1.a already use it).

For share-hosting business, combination between ATS and nginx-proxy (nginx + apache) is the best. ATS better then Varnish because more features, better performance and less complicated.
« Last Edit: 1970-01-01, 01:00:00 by Guest »
..:: MRatWork (Mustafa Ramadhan Projects) ::..
-- Server/Web-integrator - Web Hosting (Kloxo-MR READY!) --

Offline MRatWork

  • Administrator
  • The Elite
  • *****
  • Posts: 15,807
  • Karma: +119/-11
  • Gender: Male
    • View Profile
    • MRatWork Forum
Re: [6.5.1.a] New Web Cache Server (TrafficServer)
« Reply #14 on: 2013-10-05, 01:25:17 »
Don't use '-c' more then 25 because nginx will be 'ban' connection from the same ip more then 25 connections. Except connection from '127.0.0.1'
« Last Edit: 1970-01-01, 01:00:00 by Guest »
..:: MRatWork (Mustafa Ramadhan Projects) ::..
-- Server/Web-integrator - Web Hosting (Kloxo-MR READY!) --

 


Top 4 Global Search Engines:    Google    Bing    Baidu    Yahoo

Page created in 0.029 seconds with 18 queries.

web stats analysis