Friday, December 26, 2014

[Ann] Initial release of H2O, and why HTTPD performance will matter in 2015

Happy Holidays!

Today I am delighted to announce the first release of H2O, version 0.9.0; this is a christmas gift from me.


H2O is an optimized HTTP server with support for HTTP/1.x and the upcoming HTTP/2; it can be used either as a standalone server or a library.

Built around PicoHTTPParser (a very efficient HTTP/1 parser), H2O outperforms Nginx by a considerable margin. It also excels in HTTP/2 performance.



Why do we need a new HTTP server? The answer is because its performance does matter in the coming years.

It is expected that the number of files being served by the HTTP server will dramatically increase as we transit from HTTP/1 to HTTP/2.

This is because current techniques used to decrease the number of asset files (e.g. CSS sprites and CSS concatenation) becomes a drag in page rendering speed in HTTP/2. Such techniques were beneficial in HTTP/1 since the protocol had difficulty in utilizing all the available bandwidth. But in HTTP/2 the issue is fixed, and the overhead of transmitting all the images / CSS styles used by the website at once while only some of them is needed to render a specific page, becomes a bad idea. Instead, switching back to sending small asset files for every required element consisting the webpage being request becomes an ideal approach.

Having an efficient HTTP/1 server is also a good thing, as we large-scale adopt the idea of Microservices; it increases the number of HTTP requests transmitted within the datacenter.

As shown in the benchmark charts, H2O is designed with these facts in mind, making it (as we believe) an ideal choice of HTTP server of the future.

With this first release, H2O is concentrates on serving static files / working as a reverse proxy at high performance.

Together with the contributors I will continue to optimize / add more features to the server, and hopefully reach a stable release (version 1.0.0) when HTTP/2 becomes standardized in the coming months.

Stay tuned.

PS. It is also great that the tools developed by H2O is causing other effects; not only have we raised the bar on HTTP/2 server performance (nghttp2 (a de-facto reference implementation of HTTP/2) has become much faster in recent months), the performance race of HTTP/1 parser has once again become (Performance improvement and benchmark by indutny · Pull Request #200 · joyent/http-parser, Improving PicoHTTPParser further with AVX2), @imasahiro is working on merging qrintf (a preprocessor that speeds up the sprinf(3) family by a magnitude developed as a subproduct of H2O) to Clang. Using H2O as a footstep, I am looking forward to bringing in new approaches for running / maintaining websites next year.

94 comments:

  1. Nice work. Hope to see more improvements to H2O and the other projects as well.

    ReplyDelete
  2. Why do you use OpenSSL and not libreSSL?

    ReplyDelete
  3. Meanwhile how hard would be for h2o to have a spdy3 compatibility mode to benefit from it right now ?

    ReplyDelete
  4. I did some tests on a machine with 8 cores and it seems that it doesn't scale beyound 2 threads.
    On my test with ab on localhost it do not go beyound 260,000 requests by second when I increment the number of threads and it even goes bellow that mark.

    ab -n 500000 -c 1000 -k http://127.0.0.1:8020/

    Server Software: h2o/0.9.1-alpha1
    Server Hostname: 127.0.0.1
    Server Port: 8020

    Document Path: /
    Document Length: 180 bytes

    Concurrency Level: 1000
    Time taken for tests: 2.122 seconds
    Complete requests: 500000
    Failed requests: 0
    Keep-Alive requests: 500000
    Total transferred: 199500000 bytes
    HTML transferred: 90000000 bytes
    Requests per second: 235596.24 [#/sec] (mean)
    Time per request: 4.245 [ms] (mean)
    Time per request: 0.004 [ms] (mean, across all concurrent requests)
    Transfer rate: 91799.70 [Kbytes/sec] received

    1 thread : Requests per second: 113803.63 [#/sec] (mean)
    2 threads: Requests per second: 243651.89 [#/sec] (mean)
    3 threads: Requests per second: 246776.48 [#/sec] (mean)
    4 threads: Requests per second: 248771.81 [#/sec] (mean)
    5 threads: Requests per second: 236967.72 [#/sec] (mean)
    6 threads: Requests per second: 235596.24 [#/sec] (mean)

    Any idea if this is the expected behavior ?

    h2o.config
    --------------
    num-threads: 2
    listen: 8020
    listen:
    port: 8021
    ssl:
    certificate-file: examples/h2o/server.crt
    key-file: examples/h2o/server.key
    hosts:
    "127.0.0.1.xip.io:8020":
    paths:
    /:
    file.dir: examples/doc_root
    access-log: /dev/null
    "alternate.127.0.0.1.xip.io:8081":
    listen:
    port: 8021
    ssl:
    certificate-file: examples/h2o/alternate.crt
    key-file: examples/h2o/alternate.key
    paths:
    /:
    file.dir: examples/doc_root.alternate
    access-log: /dev/null



    ReplyDelete
    Replies
    1. Also executing ab on two terminals in parallel I've got:

      with 2 threads: Requests per second: 119658.69 [#/sec] (mean)
      with 4 threads: Requests per second: 156863.82 [#/sec] (mean)

      It seems that with 4 threads and the two ab executed in parallel we get around 300,000 requests by second.

      Delete
  5. See also: https://gist.github.com/markpapadakis/650081d3ee8cf6d1cedc

    ReplyDelete
  6. check out..! Here you get the Sp Flash Tools or Sp Flash Tools Links For Download

    http://www.spflashtooldownload.com/

    ReplyDelete
  7. check out ! here you get the best reviews on movies and gadegts by professionals

    http://www.trendsreviewer.com/

    ReplyDelete
  8. Yes i am totally agreed with this article and i just want say that this article is very nice and very informative article.I will make sure to be reading your blog more. You made a good point but I can't help but wonder, what about the other side? !!!!!!Thanks
    Tata Sky Customer Care Number
    GTPL Customer Care Number
    Dish TV Customer Care Number

    ReplyDelete
  9. United States Independence day is not just a great event but it USA 4th July Decoration Ideas is also a greatopportunity Independence Day Inspiring Speech of making special and sweet memories with your Fellow Americans

    ReplyDelete
  10. United States Of America Independence Day is an extraordinary occasion as well as an incredible chance of gaining unique and sweet experiences with your Kind hearted Americans. On United States us independence Of America Independence Day individuals have the colossal shot of gaining uncommon experiences with their kind hearted us independence Americans by doing as such numerous fun exercises like giving grill party, by watching baseball coordinate together, by watching parade together and by such a large number of different things.

    ReplyDelete
  11. Hi i was browsing your blog and i found it really interesting! i too have a website.Kindly check it out here
    Rajhans Residency Noida Extension
    Rajhans Residency Noida
    Rajhans Residency

    ReplyDelete
  12. It is biggest Cycling event of this year. It is also known as Tour De France 2016. Our website have provided details like Tour De France 2016 Groups, teams. We all know that Tour De France 2016 Stages are divided into 22 parts. We have explained each of them in our website. Stay tuned for more updates.

    ReplyDelete
  13. Hi i was browsing your blog and i found it really interesting! i too have a website.Kindly check it out here
    CHD Eway Towers
    CHD Eway Towers Gurgaon
    CHD Eway Towers Gurgaon Sector 109
    CHD Eway Towers Dwarka Expressway

    ReplyDelete
  14. US open 2016 Tennis is one of the biggest event of the us history.
    You can find US Tennis Open Results on our website for free.
    US Open 2016 will start soon at the eng od august month.
    Rio Olympics 2016 Mascots are great way to express feelings towards game lovers.
    You can easily find Rio Olympics 2016 Schedule on our website.
    You can also find Happy Birthday wishes.
    You can find Premier League information on our site.
    You can also find Premier League Table.

    ReplyDelete
  15. We are peoviding you a very good kind of Friendship day dp for whatsapp on this upcoming occassion of 2016.

    ReplyDelete
  16. This comment has been removed by the author.

    ReplyDelete

  17. The blog or and best that is extremely useful to keep I can share the ideas
    of the future as this is really what I was looking for, I am very comfortable and pleased to come here. Thank you very much.
    tanki online | 2048 game| tanki online game

    ReplyDelete
  18. Menjelajah wisata alam gunung bromo dari kota malang dengan menggunakan jasa paket wisata bromo midnight dari kota malang batu. Harga paket wisata bromo midnight lebih efisien namun fasilitas juga lengkap. Start perjalanan paket wisata bromo midnight dari kota berangkat jam 12 malam, anda akan di jemput ke lokasi dimana anda berada. Klik info lengkap . Pesan paket wisata bromo midnight dari malang harga murah paket wisata bromo.
    Tak usah repot-repot membawa kendaraan sendiri jika ingin liburan di malang, anda bisa menggunakan jasa sewa mobil malang batu untuk menjelajah destinasi wisata di malang batu. Untuk budget bisa dicocokkan dengan kantong untuk mendapatkan sewa mobil malang batu yang nyaman. Kisaran harga sewa mobil malang batu yaitu mulai dari 300.000 hingga 1 juta rupiah tergantung dengan jenis mobil yang akan disewa klik info lengkap.
    Jamu tradisional khusus untuk wanita yang menginginkan tubuh yang langsing dan singset agar kelihatan lebih seksi dan aduhai adalah ramuan madura galian singset. Cara pemakaian jamu galian singset ini juga sangat mudah, cukup dengan dikonsumsi pagi dan malam hari secara rutin hingga mendapatkan hasil yang maksimal. Khasiat yang akan didapatkan antara lain perut yang buncit akan mengempes, paha yang membesar akan mengecil, betis kaki yang besar juga ikut mengkerut dan lipatan-lipatan tubuh akan hilang dengan sendirinya sehingga nantinya akan didapatkan bentuk tubuh yang ideal dan proporsional berkat ramuan madura alami jamu galian singset asli dari madura tersebut. Macam-macam produk ramuan madura asli untuk pria dan wanita lihat lengkap disini.

    ReplyDelete
  19. All of the students are able to download Punjab 10th Result 2017 from here once announce. Check Punjab 12th Result with roll no. or name wise also.

    ReplyDelete
  20. Nice post I am glad to see your post. I totally inspire with your writting skills.
    Shahi Paneer Recipe
    Idli Recipe
    Dal Makhani Recipe
    Mushroom Tikka Recipe

    ReplyDelete