タグ

WebSocketとnginxに関するwarufuzaketaichiのブックマーク (2)

  • リアルタイム通信環境の(一部)構成紹介 : DSAS開発者の部屋

    こんにちは。 今回は、当社で稼働させているリアルタイム通信環境について、ご紹介させて頂きます。 ご紹介する環境に対する要件は、以下となります。 ・ゲーム内の期間限定イベントで使用し、イベント開催中のみサーバを稼働 ・リアルタイム通信。プロトコルは、websocket を使用 ・同じチームに所属するユーザを同じサーバへ接続 ・とりあえずいっぱいスケールできるように(笑 最後の要件は冗談で、実際にはちゃんとした数値を頂いているのですが、このような環境構築を依頼されましたので、AWS 上で以下にあるような構成を考えてみました。 構成図 ※ 主要なサーバのみを抜粋 ELB 外部のクライアントから、websocket な接続を受け付けます。 http(s) モードでは、websocket の通信確立に必要なヘッダが消去されてしまうため、tcp モードを使用しています。 tcp モードを有効にすると、

    リアルタイム通信環境の(一部)構成紹介 : DSAS開発者の部屋
  • WebSockets Over SSL With Node.js and Nginx – Ex Ratione

    Back before Nginx introduced support for websockets in version 1.3 I wrote a couple of posts to outline how to serve both SSL-encrypted websocket and web traffic on the same port and same server with Node.js in the back end and either an HAProxy or Varnish and Stunnel front end. The typical scenario here is that you are setting up servers for a single page web application that uses Express.js to s

  • 1