Say Hello to HTTP/2

HTTP 2

 

                  The HTTP/1.x was born in 1999 and the web is evolved a lot in the last decade.  As part of HTTP/1.x the web has performance issues and the developers found the hacks to overcome it. Below are some of the hacks which we used.

  • As HTTP/1.x opens the new TCP connection for each request, downloading many files from the single server become more resource intensive and the bottleneck for performance. To avoid it,
    • Used the CSS sprites, in which download the bigger image containing the small images in it and show/hide at the client side.
    • Minifying CSS and JS files and loss less compression of the images to reduce the download time.
    • Merging the multiple CSS and JS files into one, so that the number of requests will be reduced.
    • Hosting the assets like images in to different domains. So that the multiple servers will serve the content to the web page.

                 To overcome with all the above said hacks google team came up with SPDY (Pronounce as “SPEEDY”) protocol and which is used as part of Google Chrome browsers. Now, the same team thought to revamp HTTP/1.1 and proposed HTTP/2. The teams from Facebook, Amazon  and others came forward  and part of the Hypertext Transfer Protocol working group Internet Engineering Task Force(IETF).

 Now, Let us see what features the HTTP/2 will provide.

  • Multiplexing (Open a single TCP connection and reuse the same for other requests).
  • Server Push (Pushing the content from the server to user agent, before it is asking).
  • Compression of HTTP headers.
  • Prioritization of resource (download the highest priority resource first than the other one).
  • Binary framing layer (not compatible with HTTP/1.1)

Now, as web developers we get lot of questions on adapting of HTTP/2. Below are couples of the questions.

  1. Is there any change to the HTTP status codes, HTTP methods, Header fields etc..?
  2. Do I need to change my code to adhere to HTTP/2?
  3. Do I need to change my web server to work with HTTP/2?
  4. Do I need to change the web browser to utilize HTTP/2?

                  As developers we no need to think about the question 1 and question 2. There are no changes to HTTP status codes, HTTP methods, header fields etc … We no need to change the code which is working for HTTP/1.1. The HTTP/2 is having backward compatibility to work with HTTP/1.1. For Question 3 and 4, yes we need to change the web server and the browser to support for HTTP/2. Below is the information of the web servers and the browser releases.

Browsers:

  • Mozilla Firefox providing support for HTTP/2 from Firefox release 36.
  • Google chrome provided support from release 40 onward.
  • Safari 8
  • Internet Explorer supports HTTP/2 in version 11, but only for Windows 10 beta.

Webservers:

  • IIS, on Windows 10 full support for HTTP/2
  • By 2015 Nginx is ready to support HTTP/2
  • Apache, not sure when HTTP/2 support is provided.

If you have any more info on HTTP/2, you can discuss as part of comments. Till then, Happy Exploring!!!

Advertisements

I am Siva Prasad Rao Janapati. Working as a software developer. Has hands on experience on ATG Commerce(DAS/DPS/DCS), Mozu commerce, Broadleaf Commerce, Java, JEE, Spring, Play, JPA, Hibernate, Velocity, JMS, Jboss, Weblogic,Tomcat, Jetty, Apache, Apache Solr, Spring Batch, JQuery, NodeJS, SOAP, REST, MySQL, Oracle, Mongo DB, Memcached, HazelCast, Git, SVN, CVS, Ant, Maven, Gradle, Amazon Web services, Rackspace, Quartz, JMeter, Junit, Open NLP, Facebook Graph,Twitter4J, YouTube Gdata, Bazzarvoice,Yotpo, 4-Tell, Alatest, Shopzilla, Linkshare. I have hands on experience on open sources and commercial technologies.

Tagged with:
Posted in General
2 comments on “Say Hello to HTTP/2
  1. Anonymous says:

    HTTP header compression/HTTP pipelining explained well here by Akami.Interested guys please watch : https://www.youtube.com/watch?v=WkLBrHW4NhQ

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

DZone

DZone MVB

Java Code Geeks
Java Code Geeks
%d bloggers like this: