Install spdy in nginxlua

Source: Internet
Author: User
: This article describes how to install spdy in nginxlua. if you are interested in the PHP Tutorial, refer to it. About spdy

From http://zh.wikipedia.org/wiki/SPDY

SPDY

SPDY is an application layer protocol developed by Google based on the Transmission Control Protocol (TCP. Google first proposed the SPDY protocol in Chromium [1]. It has been used in Google Chrome to access Google's SSL encryption service.
SPDY is currently not a standard protocol, but SPDY's development team has begun to promote SPDY to become a formal standard (now the Internet Draft), Google Chrome, Mozilla Firefox, both Opera and Internet Explorer support the SPDY protocol. The SPDY protocol is similar to HTTP, but it is designed to shorten the webpage loading time and improve security. The SPDY protocol reduces the loading time by compressing, multiplexing, and priority. SPDY is not just the abbreviation of "speedy. SPDY is now a trademark of Google.

Design

SPDY is designed to reduce the loading time of webpages. Through priority and multiplexing, SPDY allows you to transmit webpage content, images, and other resources by setting up a TCP connection. SPDY is widely used in TLS encryption, and the transmitted content is also compressed in gzip or DEFLATE format (unlike HTTP, HTTP headers are not compressed ). In addition, in addition to passively waiting for the browser to initiate a request like HTTP, SPDY's web server can also actively push content.

Relationship with HTTP

SPDY is not used to replace HTTP. it only modifies the transmission mode of HTTP requests and responses over the network. This means that you only need to add a SPDY transport layer, no modifications are required for all existing server applications. When transmitted using SPDY, HTTP requests are processed, marked to be simplified, and compressed. For example, each SPDY endpoint keeps track of the HTTP packet header that has been sent in the previous request, so as to avoid repeated headers that have not changed. The data of unsent packets will be compressed and sent.

1. install spdy

Download the nginx + lua module.
Http://openresty.org/cn/index.html

The latest version is the ngx_openresty-1.7.7.2.tar.gz.
Installation Command
./Configure-with-http_spdy_module

2. configuration

server {    listen 443 ssl spdy;    ssl_certificate server.crt;    ssl_certificate_key server.key;    ...}

Very simple.

3. test

Use chrome to view

Or use spdy to test the website:

4. about spdy

If chrome or firefox supports spdy, it will be accelerated by spdy; otherwise, http1.1 will be used.
For details about spdy performance optimization, refer:
Http://www.infoq.com/cn/news/2015/02/https-spdy-http2-comparison#rd
Nginx + lua support for spdy:
Http://wiki.nginx.org/HttpLuaModule#SPDY_Mode_Not_Fully_Supported
For more information about complex installation, see. Use google's native spdy for installation.
Http://edge2.blogspot.com/2014/05/install-nginx-naxsi-modpagespeed-spdy.html
Another detailed introduction to spdy
Http://www.geekpark.net/topics/158198

The above describes how to install spdy in nginx lua, including some content. I hope some friends who are interested in PHP tutorials can help me.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.