python 및 머신러닝 교육, 슬로우캠퍼스



HAProxy, Nginx, node.js 조합으로 SSL websocket 구성하기

http://www.exratione.com/2012/12/websockets-over-ssl-haproxy-nodejs-nginx/



  • HAProxy를 맨 앞에 세우고, 뒤에 node.js (HTTPServer)와 nginx(static file 및 non-node.js 페이지 처리)
  • HAProxy가 SSL 트래픽의 암호화를 풀어서 node.js 와 nginx 에 트래픽을 분배하여 전달한다.


Scaling node.js 

http://cjihrig.com/blog/scaling-node-js-applications/


3 가지 접근 방법이 있다.

  1. 'cluster'라는 기본 모듈을 이용하여 하나의 서버 상에 process를 여러개 fork 한다.  http://nodejs.org/api/cluster.html
  2. 'http-proxy'라는 추가 모듈을 이용하여 여러 서버 상에 load balance 할 수 있다. 이 모듈로 간단한 nginx 역할을 할 수가 있다. npm install http-proxy
  3. nginx 라는 'reverse proxy' 도구를 설치하여 여러 서버 상에 load balance 할 수 있다.


'Cloud Computing' 카테고리의 다른 글

UX- 속도의 심리학  (0) 2013.08.07
node.js 입문 메모  (0) 2013.04.12
Redis fork 성능 문제  (0) 2013.03.19
대용량 처리 서버 솔루션 (G-WAN, NXWEB)  (0) 2013.03.15
C10K Problem (kegel.com 원본 보관용)  (0) 2013.03.15

WRITTEN BY
manager@
Data Analysis, Text/Knowledge Mining, Python, Cloud Computing, Platform

,