nginx - 처음 접속시 속도가 늦은 것의 해결방법이 무엇인가요?

회원K   
   조회 8323   추천 0    

웹브라우져에서 nginx를 처음 접속하면 속도가 상당히 늦더라구요.


구글에서 찾아보니, 엄청나게 많은 문서들이 있는데...

기술적인 이야기들만 있고

실제로 뭘 하라는 것인지는 애매하더라구요.

https://www.google.co.kr/?gfe_rd=cr&ei=P0zxVp-mGtPU8Ae35YGADA#newwindow=1&q=Slow+first+connect+through+nginx


nginx의 첫 접속을 빠르게 하는 방법. 조언 부탁드립니다.

- to be continue -
짧은글 일수록 신중하게.
김제연 2016-03
혹시 도메인 연결 하셨나요? 도메인 말고 ip로도 느린지 확인해보세요.
     
회원K 2016-03
ip로만 접속하고 있습니다.
epowergate 2016-03
nginx는 event driven입니다.  그렇기 때문에 초기에 약간의 delay를 느끼실 수 있습니다.
반면에 apache는 항상 떠있죠.
     
회원K 2016-03
auto로 했더니 이렇게 많아요. 프로세스는.
apache도 prefork가 아닌 event를 쓰고 있구요 (2CPU 사이트처럼...)
앱이든 웹이든 처음 access가 이렇게 늦으면 상당히 짜증이 날 것 같아서요.

root      6547    1  0 06:14 ?        00:00:00 nginx: master process /usr/sbin/nginx -c /etc/nginx/nginx.conf
nginx    6548  6547  0 06:14 ?        00:00:03 nginx: worker process
nginx    6549  6547  0 06:14 ?        00:00:02 nginx: worker process
nginx    6550  6547  0 06:14 ?        00:00:03 nginx: worker process
nginx    6551  6547  0 06:14 ?        00:00:03 nginx: worker process
nginx    6552  6547  0 06:14 ?        00:00:02 nginx: worker process
nginx    6553  6547  0 06:14 ?        00:00:02 nginx: worker process
nginx    6554  6547  0 06:14 ?        00:00:03 nginx: worker process
nginx    6555  6547  0 06:14 ?        00:00:03 nginx: worker process
nginx    6556  6547  0 06:14 ?        00:00:03 nginx: worker process
nginx    6557  6547  0 06:14 ?        00:00:03 nginx: worker process
nginx    6558  6547  0 06:14 ?        00:00:03 nginx: worker process
nginx    6559  6547  0 06:14 ?        00:00:03 nginx: worker process
nginx    6560  6547  0 06:14 ?        00:00:03 nginx: worker process
nginx    6561  6547  0 06:14 ?        00:00:03 nginx: worker process
nginx    6562  6547  0 06:14 ?        00:00:03 nginx: worker process
nginx    6563  6547  0 06:14 ?        00:00:03 nginx: worker process
nginx    6564  6547  0 06:14 ?        00:00:03 nginx: worker process
nginx    6565  6547  0 06:14 ?        00:00:02 nginx: worker process
nginx    6566  6547  0 06:14 ?        00:00:03 nginx: worker process
nginx    6567  6547  0 06:14 ?        00:00:02 nginx: worker process
nginx    6568  6547  0 06:14 ?        00:00:03 nginx: worker process
nginx    6569  6547  0 06:14 ?        00:00:03 nginx: worker process
nginx    6570  6547  0 06:14 ?        00:00:03 nginx: worker process
nginx    6571  6547  0 06:14 ?        00:00:03 nginx: worker process
nginx    6572  6547  0 06:14 ?        00:00:03 nginx: worker process
nginx    6573  6547  0 06:14 ?        00:00:03 nginx: worker process
nginx    6574  6547  0 06:14 ?        00:00:02 nginx: worker process
nginx    6575  6547  0 06:14 ?        00:00:03 nginx: worker process
nginx    6576  6547  0 06:14 ?        00:00:03 nginx: worker process
nginx    6577  6547  0 06:14 ?        00:00:02 nginx: worker process
nginx    6578  6547  0 06:14 ?        00:00:03 nginx: worker process
nginx    6579  6547  0 06:14 ?        00:00:03 nginx: worker process
root      7873  7851  0 20:22 pts/0    00:00:00 grep --color=auto nginx
파닥파닥 2016-03
근데, 의미 있을정도로 느린가요?
최근 제가 담당하는 서비스들도 frontend  는 nginx 가 대다수인데, 체감상 느리다는 내용 접수가 없어서요
(대부분 xx ms 안에 최초 response 들어오는 상황이라)
     
회원K 2016-03
처음 접속이 이루어질 때, 10s 정도 나올정도로 까지 느립니다.
이후에는 아주 빠르구요.

이런 상황이구요. php-fpm 등의 튜닝은 모두 다 한 것 같습니다.
http://stackoverflow.com/questions/32114788/slow-first-connect-through-nginx
회원K 2016-03
원인 :
서버의 시간이 앞으로 많이 가 있었다고 합니다. -..-...
서버에서 rdate를 매일 돌게 해뒀는데왜 이런일이???


QnA
제목Page 2479/5730
2015-12   1791537   백메가
2014-05   5266642   정은준1
2017-08   24314   박위롱
2016-08   4832   김건우
2024-08   1356   Mazenda
2015-08   4209   송상병
2018-12   3343   미수맨
2023-01   2340   syhj
2012-03   5218   방o효o문
2014-04   4416   Sunrise
2012-03   5796   꾸럭씨
2018-12   7510   김건우
2017-09   6744   총각
2021-05   3489   예술은폭팔
2018-12   3476   박문형
2015-08   4312   깜박깜박가
2016-09   4383   izegtob
2017-09   4174   아스란
2021-06   3538   s김종화z
2017-09   4292   전산oa
2012-05   13892   무아
2015-09   5454   포레버