LINUX.ORG.RU

История изменений

Исправление alozovskoy, (текущая версия) :

Не занимает, пруф:

$ netstat -n | grep 178.248.233.6
tcp        0      0 10.0.1.210:39570        178.248.233.6:443       ESTABLISHED
tcp        0      0 10.0.1.210:39572        178.248.233.6:443       ESTABLISHED
tcp        0      0 10.0.1.210:39571        178.248.233.6:443       ESTABLISHED
tcp        0      0 10.0.1.210:39567        178.248.233.6:443       TIME_WAIT  
tcp        0      0 10.0.1.210:39566        178.248.233.6:443       TIME_WAIT

Но какую-нибудь vps'ку простенькую ты можешь положить даже при помощи ab:

$ ab -n 1000 -c 100 http://10.0.2.148:8080/test.html
This is ApacheBench, Version 2.3 <$Revision: 1604373 $>
Copyright 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/
Licensed to The Apache Software Foundation, http://www.apache.org/

Benchmarking 10.0.2.148 (be patient)
Completed 100 requests
Completed 200 requests
Completed 300 requests
Completed 400 requests
Completed 500 requests
Completed 600 requests
Completed 700 requests
Completed 800 requests
Completed 900 requests
Completed 1000 requests
Finished 1000 requests


Server Software:        SimpleHTTP/0.6
Server Hostname:        10.0.2.148
Server Port:            8080

Document Path:          /test.html
Document Length:        6 bytes

Concurrency Level:      100
Time taken for tests:   0.822 seconds
Complete requests:      1000
Failed requests:        0
Total transferred:      189000 bytes
HTML transferred:       6000 bytes
Requests per second:    1216.75 [#/sec] (mean)
Time per request:       82.186 [ms] (mean)
Time per request:       0.822 [ms] (mean, across all concurrent requests)
Transfer rate:          224.58 [Kbytes/sec] received

Connection Times (ms)
              min  mean[+/-sd] median   max
Connect:        0    0   0.5      0       6
Processing:     2    5  36.3      4     816
Waiting:        1    5  36.3      3     816
Total:          3    5  36.5      4     821

Percentage of the requests served within a certain time (ms)
  50%      4
  66%      4
  75%      4
  80%      4
  90%      4
  95%      4
  98%      7
  99%      8
 100%    821 (longest request)

Все запросы с моего клиента (10.0.2.1) на 10.0.2.148:8080 ушли, на клиенте у меня соединений с сервером нет (потому что ab их побросал), а на сервере:

$ netstat -an | grep 10.0.2.1 | wc -l
1000

И выглядят они вот так (привожу часть):

tcp        0      0 10.0.2.148:8080         10.0.2.1:60063          TIME_WAIT  
tcp        0      0 10.0.2.148:8080         10.0.2.1:60295          TIME_WAIT  
tcp        0      0 10.0.2.148:8080         10.0.2.1:60856          TIME_WAIT  
tcp        0      0 10.0.2.148:8080         10.0.2.1:60398          TIME_WAIT  
tcp        0      0 10.0.2.148:8080         10.0.2.1:60194          TIME_WAIT  

Если запросов будет много на сервере можем получить, например, переполнение conntrack-таблицы, и все соединения сверх будут отваливаться. Ну и man C10K.

Исправление alozovskoy, :

Не занимает, пруф:

$ netstat -n | grep 178.248.233.6
tcp        0      0 10.0.1.210:39570        178.248.233.6:443       ESTABLISHED
tcp        0      0 10.0.1.210:39572        178.248.233.6:443       ESTABLISHED
tcp        0      0 10.0.1.210:39571        178.248.233.6:443       ESTABLISHED
tcp        0      0 10.0.1.210:39567        178.248.233.6:443       TIME_WAIT  
tcp        0      0 10.0.1.210:39566        178.248.233.6:443       TIME_WAIT

Но какую-нибудь vps'ку простенькую ты можешь положить даже при помощи ab:

$ ab -n 1000 -c 100 http://10.0.2.148:8080/test.html
This is ApacheBench, Version 2.3 <$Revision: 1604373 $>
Copyright 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/
Licensed to The Apache Software Foundation, http://www.apache.org/

Benchmarking 10.0.2.148 (be patient)
Completed 100 requests
Completed 200 requests
Completed 300 requests
Completed 400 requests
Completed 500 requests
Completed 600 requests
Completed 700 requests
Completed 800 requests
Completed 900 requests
Completed 1000 requests
Finished 1000 requests


Server Software:        SimpleHTTP/0.6
Server Hostname:        10.0.2.148
Server Port:            8080

Document Path:          /test.html
Document Length:        6 bytes

Concurrency Level:      100
Time taken for tests:   0.822 seconds
Complete requests:      1000
Failed requests:        0
Total transferred:      189000 bytes
HTML transferred:       6000 bytes
Requests per second:    1216.75 [#/sec] (mean)
Time per request:       82.186 [ms] (mean)
Time per request:       0.822 [ms] (mean, across all concurrent requests)
Transfer rate:          224.58 [Kbytes/sec] received

Connection Times (ms)
              min  mean[+/-sd] median   max
Connect:        0    0   0.5      0       6
Processing:     2    5  36.3      4     816
Waiting:        1    5  36.3      3     816
Total:          3    5  36.5      4     821

Percentage of the requests served within a certain time (ms)
  50%      4
  66%      4
  75%      4
  80%      4
  90%      4
  95%      4
  98%      7
  99%      8
 100%    821 (longest request)

Все запросы с моего клиента (10.0.2.1) на 10.0.2.148:8080 ушли, на клиенте у меня соединений с сервером нет (потому что ab их побросал), а на сервере:

$ netstat -an | grep 10.0.2.1 | wc -l
1000

И выглядят они вот так (привожу часть):

tcp        0      0 10.0.2.148:8080         10.0.2.1:60063          TIME_WAIT  
tcp        0      0 10.0.2.148:8080         10.0.2.1:60295          TIME_WAIT  
tcp        0      0 10.0.2.148:8080         10.0.2.1:60856          TIME_WAIT  
tcp        0      0 10.0.2.148:8080         10.0.2.1:60398          TIME_WAIT  
tcp        0      0 10.0.2.148:8080         10.0.2.1:60194          TIME_WAIT  

Исходная версия alozovskoy, :

Не занимает, пруф:

$ netstat -n | grep 178.248.233.6
tcp        0      0 10.0.1.210:39570        178.248.233.6:443       ESTABLISHED
tcp        0      0 10.0.1.210:39572        178.248.233.6:443       ESTABLISHED
tcp        0      0 10.0.1.210:39571        178.248.233.6:443       ESTABLISHED
tcp        0      0 10.0.1.210:39567        178.248.233.6:443       TIME_WAIT  
tcp        0      0 10.0.1.210:39566        178.248.233.6:443       TIME_WAIT

Но какую-нибудь vps'ку простенькую ты можешь положить даже при помощи ab:

$ ab -n 1000 -c 100 http://10.0.2.148:8080/test.html
This is ApacheBench, Version 2.3 <$Revision: 1604373 $>
Copyright 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/
Licensed to The Apache Software Foundation, http://www.apache.org/

Benchmarking 10.0.2.148 (be patient)
Completed 100 requests
Completed 200 requests
Completed 300 requests
Completed 400 requests
Completed 500 requests
Completed 600 requests
Completed 700 requests
Completed 800 requests
Completed 900 requests
Completed 1000 requests
Finished 1000 requests


Server Software:        SimpleHTTP/0.6
Server Hostname:        10.0.2.148
Server Port:            8080

Document Path:          /test.html
Document Length:        6 bytes

Concurrency Level:      100
Time taken for tests:   0.822 seconds
Complete requests:      1000
Failed requests:        0
Total transferred:      189000 bytes
HTML transferred:       6000 bytes
Requests per second:    1216.75 [#/sec] (mean)
Time per request:       82.186 [ms] (mean)
Time per request:       0.822 [ms] (mean, across all concurrent requests)
Transfer rate:          224.58 [Kbytes/sec] received

Connection Times (ms)
              min  mean[+/-sd] median   max
Connect:        0    0   0.5      0       6
Processing:     2    5  36.3      4     816
Waiting:        1    5  36.3      3     816
Total:          3    5  36.5      4     821

Percentage of the requests served within a certain time (ms)
  50%      4
  66%      4
  75%      4
  80%      4
  90%      4
  95%      4
  98%      7
  99%      8
 100%    821 (longest request)

Все запросы с моего клиента (10.0.2.1) на 10.0.2.148:8080 ушли, на клиенте у меня соединений с сервером нет (потому что ab их побросал), а на сервере:

$ netstat -an | grep 10.0.2.1 | wc -l

И выглядят они вот так (привожу часть):

tcp        0      0 10.0.2.148:8080         10.0.2.1:60063          TIME_WAIT  
tcp        0      0 10.0.2.148:8080         10.0.2.1:60295          TIME_WAIT  
tcp        0      0 10.0.2.148:8080         10.0.2.1:60856          TIME_WAIT  
tcp        0      0 10.0.2.148:8080         10.0.2.1:60398          TIME_WAIT  
tcp        0      0 10.0.2.148:8080         10.0.2.1:60194          TIME_WAIT