Re: Http 2 support in Tomcat

2015-05-17 Thread PerfGuru
Thanks Rainer, I was looking at reasons not to use websockets and found this 
recent blog. Be interesting to see if HTTP/2 has simular issues. 
http://www.pubnub.com/knowledge-base/discussion/311/current-websockets-limitations
 Regards,-Tony 
  From: Rainer Jung rainer.j...@kippdata.de
 To: Tomcat Users List users@tomcat.apache.org 
 Sent: Friday, May 15, 2015 3:12 PM
 Subject: Re: Http 2 support in Tomcat
   
Am 15.05.2015 um 20:43 schrieb PerfGuru:
 Thanks Mark  Chris this is a very informative. I am using a httpd that 
 supports http/2 and wow is it impressive. Sorry, I had to stop using 
 Apache/Tomcat to use it but the performance and bandwidth gains are so nice 
 it is addicting and my users have noticed. I will look into jre/jdk 9 and ask 
 Oracle if servlet 4 is in the EA's. I would like to stay with http/2 rather 
 than go to websockets but I am an early adaptor and if it is stable and has 
 servlet 4 with http/2 I will give it a try and let you know the results. Best 
 Regards,-Tony

Note that web socket and HTTP/2 serve very different purposes. Web 
sockets provide you basically with a socket you can use for setting up 
your own protocol and get rid of request/response semantics. Web socket 
allow to set up asynchoneous communication.

HTTP/2 more or less has the same request/response semantics as HTTP. It 
is onyl a more efficient implementation of that by combining multiple 
request/response streams into one TCP connection, using header 
compression etc. etc. HTTP/2 is still synchroneous. Yes, there is a 
notion of server push, but push in HTTP/2 is very different from what 
one would name a push in the web socket world.

I think it would be better to clearly keep the two terms web socket and 
HTTP/2 separated.

Regards,

Rainer






-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



  

Re: Http 2 support in Tomcat

2015-05-15 Thread Mark Thomas
On 15/05/2015 08:55, anjan bacchu wrote:
   wondering what the plans are for supporting HTTP 2 support in tomcat ?
 When is it planned ? Which version(s) are likely to get support ?

Work is in progress now.
http://tomcat.markmail.org/thread/twqufoz53txetagh

I hope to have basic support working in the next couple of weeks (it is
probably only a couple of days work but I have other stuff I need to do
first). Complete support will need to wait until the Servlet EG decides
what the API is going to look like. Until then I'll probably implement
whatever the latest thinking is in the Servlet EG.

It will be included in Tomcat 9 (it will be required by Servlet 4.0).

We may back-port support to earlier versions but that would require
significant refactoring of the I/O code to do so.

Mark


-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Http 2 support in Tomcat

2015-05-15 Thread anjan bacchu
  wondering what the plans are for supporting HTTP 2 support in tomcat ?
When is it planned ? Which version(s) are likely to get support ?


Re: Http 2 support in Tomcat

2015-05-15 Thread PerfGuru
Good news thanks for the update. It may be some time before servlet 4 support 
is released but good to know Tomcat will be ready then.But does APR support 
http/2? I know other web servers now do. Also, I think Tomcat supports 
websockets which has the important capabilities that http/2 has and has been 
available longer. Depending upon your strategy you might want to go with that 
or wait a couple of years for http/2. Remember the firewalls, proxies and other 
network systems have to support http/2 before it can reach Tomcat. So it may be 
by the time http/3 is approved. Regards,-Tony
  From: Mark Thomas ma...@apache.org
 To: Tomcat Users List users@tomcat.apache.org 
 Sent: Friday, May 15, 2015 2:00 AM
 Subject: Re: Http 2 support in Tomcat
   
On 15/05/2015 08:55, anjan bacchu wrote:
  wondering what the plans are for supporting HTTP 2 support in tomcat ?
 When is it planned ? Which version(s) are likely to get support ?

Work is in progress now.
http://tomcat.markmail.org/thread/twqufoz53txetagh

I hope to have basic support working in the next couple of weeks (it is
probably only a couple of days work but I have other stuff I need to do
first). Complete support will need to wait until the Servlet EG decides
what the API is going to look like. Until then I'll probably implement
whatever the latest thinking is in the Servlet EG.

It will be included in Tomcat 9 (it will be required by Servlet 4.0).

We may back-port support to earlier versions but that would require
significant refactoring of the I/O code to do so.

Mark


-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



  

Re: Http 2 support in Tomcat

2015-05-15 Thread PerfGuru
Hi Chris, I do not want to start a war but I am using Wildfly 9.0.0 CR1. The 
initial reason I looked it was due to Undertow. Then I found out they had a 
HTTP/2 implementation and when I tried that for half of my requests headers 
went from 3xx bytes down to 3x bytes. The response times were a millisecond but 
I expected that and they have put into place a measurement down to nanoseconds 
since internally I am seeing less than microsecond sometimes from my cache 
system. I plan to move away from Wildfly and use just Undertow if I can to have 
a lighter container but it was advised to start with Wildfly to use Undertow. 
For me I feel servlets are getting old and need to be replaced by something 
else. Way to many layers to get to your application code. I also believe with 
all the advancements in CPU and memory size that limiting to a single thread 
when using stateless requests is a waste of capability. Incremental increases 
in capability is a safe way to go but fun to try something leading edge even if 
I have to create it myself.
Sorry about the rambling. I am still trying to get the servlet 4 implementation 
release date. Best Regards to Apache,-Tony
  From: Christopher Schultz ch...@christopherschultz.net
 To: Tomcat Users List users@tomcat.apache.org 
 Sent: Friday, May 15, 2015 2:49 PM
 Subject: Re: Http 2 support in Tomcat
   
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA256

Tony,

On 5/15/15 2:43 PM, PerfGuru wrote:
 Thanks Mark  Chris this is a very informative. I am using a httpd 
 that supports http/2 and wow is it impressive. Sorry, I had to
 stop using Apache/Tomcat to use it but the performance and
 bandwidth gains are so nice it is addicting and my users have
 noticed.

How does it compare to, say, HTTP/1.1 + Content-Encoding: gzip? I
realize that HTTP/1.1 never compresses the message headers and that
H/2 uses tokens and Huffman Coding to further compress the headers,
but I'd like to see some real-world data if you have it.

What server are you using?

 I will look into jre/jdk 9 and ask Oracle if servlet 4 is in the 
 EA's. I would like to stay with http/2 rather than go to
 websockets but I am an early adopter and if it is stable and has
 servlet 4 with http/2 I will give it a try and let you know the
 results.

When Tomcat 9 goes Stable, HTTP/2 will definitely work. I'm sure there
will be some edge cases that will need to be fixed as time goes on,
but the spec will require H/2 and Tomcat will implement faithfully. We
don't want to merely say oh, yeah, H/2 kinda works and, well, we HAD
to do it, so YMMV. We want to say you can rely on Tomcat to serve
H/2 as well as H/1.

- -chris
-BEGIN PGP SIGNATURE-
Version: GnuPG v2
Comment: GPGTools - http://gpgtools.org

iQIcBAEBCAAGBQJVVlvjAAoJEBzwKT+lPKRY3bwP/1wqb41Eu1fqN80MbrcUUdrJ
qnrWD4o9EsvpPo5Abe0mkGXwiP+F2blDKFRYSXolpuADbmMpsd2gLPjrEGiy6H/J
M6HFbjWPTAt4cIzscSZjAAUrpe05v0M39ZuV7z+nHXjT5UTyZQgmiNn3uvHPbVwQ
DnfwTReswgyi0E5O5Q3qRz32lP49OpZyLgvAEl4N2cd64a+7ScX1eMHpq/NuVuQ8
N+E/GdgsC+UFOO6DYKHNsn8/kOZ1B7oP4e9fmudnBDCXOFTfqB5lsgGRTkvdXQR8
6dJEq8PkkTxPt0tqdd0UAT6FcLU0Axsm/CzNtej5pj5mIUrt9e5PpRPLH8uk1h2/
waq88NyOxJoYKycngubgK/rL1IET7kJ/Nu4f4j4hFDhMxox1w3K9HrMdKogpPYCY
Uh7mdCphpjQxZirkwDnDlwOtbq+t66mNM/DJkeumQ3zfC3fe2wLevnDd7cNOEEx/
fj/r2GbB5p+EtOm67ysAyMc5STdobbueZO/ggBleD2tIiMxOcWE+sXbaXHNzydw4
y9phbm75Q2P8w8EslITnyqyTtbUdyAYJUAhy6nosHXujwwAp+wK+J1yfSzlu4a2w
fLjgp92QsYP5fcA7yyNv0zI0tIREKJwONyL+vd2DD1IGibdxKGssjCtUr0QkhpfT
BXvYpY5JXNoF0YDIEchy
=QGzZ
-END PGP SIGNATURE-



-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



  

Re: Http 2 support in Tomcat

2015-05-15 Thread Stefan Mayr

Am 15.05.2015 um 20:23 schrieb Christopher Schultz:

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA256

Mark,

On 5/15/15 12:59 PM, Mark Thomas wrote:

On 15/05/2015 17:49, Christopher Schultz wrote:

Tony,

On 5/15/15 12:06 PM, PerfGuru wrote:

Good news thanks for the update. It may be some time before
servlet 4 support is released but good to know Tomcat will be
ready then. But does APR support http/2? I know other web
servers now do.


Mark's initial work on the HTTP/2 connector has been using APR.
Note that APR doesn't handle the HTTP protocol, it just helps
manage sockets, pools, etc. The protocol needs to be built on top
of those building blocks. Please see the dev list (archives) for
details. Just search for HTTP/2 subjects.


Correct. This is primarily because ALPN support is not there in
JSSE yet and wont be until Java 9. That said, one of the reasons
for the huge amount of connector refactoring that I did before
starting on HTTP/2 was so that the connector implementation
specific code was kept to a minimum (so far just ALPN). HTTP/2 will
work just fine with NIO and NIO2 just as soon as JSSE support ALPN
and we plumb it in.


Is this something that's workable with the current pre-release builds
of Java 9? Presumably, Servlet 4 will require Java 8. Does that mean
that HTTP/2 with the NIO connectors will only be available with a
higher JRE version?


h2c support (HTTP/2 over a cleartext channel via HTTP upgrade
rather than TLS) is also on the TODO list. It shouldn't be much
work to add (less than a day) and it wil be available for all
connectors.




Also, I think Tomcat supports websockets which has the
important capabilities that http/2 has and has been available
longer.


Tomcat supports Websocket since Tomcat 7, as long as you are
running on Java 7 or higher.


Depending upon your strategy you might want to go with that or
wait a couple of years for http/2. Remember the firewalls,
proxies and other network systems have to support http/2 before
it can reach Tomcat. So it may be by the time http/3 is
approved.


Tomcat has no choice (application developers do). Servlet 4.0 will
require HTTP/2 so Tomcat has to support it.


Correct. Using Websocket through certain proxies (e.g. httpd) is
even still sometimes tricky.


Yeah. We should touch base with jimjag and discuss this. I think
the httpd thinking around WebSockets and the Java world thinking
about WebSockets aren't quite lined up.


+1

Perhaps there isn't much use for Websockets in the Perl or PHP world,
where a lot of httpd installations are being used.

Jim Riggs's (reprise, I believe) presentation at ApacheCon about how
mod_php needs to die (paraphrasing) advocates more extensive use of
mod_proxy_* to physically separate the web tier from the application
tier, in a way that more closely resembles how Java webapps are
deployed. Perhaps if the world starts listening to the Jim Riggses of
the world, the shortcomings of mod_proxy_websocket and friends will
become more apparent.


Do you see any problems using a HTTP/2 enabled proxy in front of Tomcat 
HTTP or AJP connectors? Combining httpd with mod_h2 and mod_jk should 
give us enough time for Servlet 4.0 -  assuming that the critical slow 
bandwith, high latency path between the client and the proxy benefits 
most of the new procotol.


- Stefan


--
Mayr Stefan

Hausen - Gassenaecker 10
82269 Geltendorf

Tel.: 08193 - 9979469

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: Http 2 support in Tomcat

2015-05-15 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA256

Mark,

On 5/15/15 12:59 PM, Mark Thomas wrote:
 On 15/05/2015 17:49, Christopher Schultz wrote:
 Tony,
 
 On 5/15/15 12:06 PM, PerfGuru wrote:
 Good news thanks for the update. It may be some time before
 servlet 4 support is released but good to know Tomcat will be
 ready then. But does APR support http/2? I know other web
 servers now do.
 
 Mark's initial work on the HTTP/2 connector has been using APR.
 Note that APR doesn't handle the HTTP protocol, it just helps
 manage sockets, pools, etc. The protocol needs to be built on top
 of those building blocks. Please see the dev list (archives) for
 details. Just search for HTTP/2 subjects.
 
 Correct. This is primarily because ALPN support is not there in
 JSSE yet and wont be until Java 9. That said, one of the reasons
 for the huge amount of connector refactoring that I did before
 starting on HTTP/2 was so that the connector implementation
 specific code was kept to a minimum (so far just ALPN). HTTP/2 will
 work just fine with NIO and NIO2 just as soon as JSSE support ALPN
 and we plumb it in.

Is this something that's workable with the current pre-release builds
of Java 9? Presumably, Servlet 4 will require Java 8. Does that mean
that HTTP/2 with the NIO connectors will only be available with a
higher JRE version?

 h2c support (HTTP/2 over a cleartext channel via HTTP upgrade
 rather than TLS) is also on the TODO list. It shouldn't be much
 work to add (less than a day) and it wil be available for all
 connectors.
 
 
 Also, I think Tomcat supports websockets which has the
 important capabilities that http/2 has and has been available
 longer.
 
 Tomcat supports Websocket since Tomcat 7, as long as you are
 running on Java 7 or higher.
 
 Depending upon your strategy you might want to go with that or
 wait a couple of years for http/2. Remember the firewalls,
 proxies and other network systems have to support http/2 before
 it can reach Tomcat. So it may be by the time http/3 is
 approved.
 
 Tomcat has no choice (application developers do). Servlet 4.0 will 
 require HTTP/2 so Tomcat has to support it.
 
 Correct. Using Websocket through certain proxies (e.g. httpd) is
 even still sometimes tricky.
 
 Yeah. We should touch base with jimjag and discuss this. I think
 the httpd thinking around WebSockets and the Java world thinking
 about WebSockets aren't quite lined up.

+1

Perhaps there isn't much use for Websockets in the Perl or PHP world,
where a lot of httpd installations are being used.

Jim Riggs's (reprise, I believe) presentation at ApacheCon about how
mod_php needs to die (paraphrasing) advocates more extensive use of
mod_proxy_* to physically separate the web tier from the application
tier, in a way that more closely resembles how Java webapps are
deployed. Perhaps if the world starts listening to the Jim Riggses of
the world, the shortcomings of mod_proxy_websocket and friends will
become more apparent.

- -chris
-BEGIN PGP SIGNATURE-
Version: GnuPG v2
Comment: GPGTools - http://gpgtools.org

iQIcBAEBCAAGBQJVVjm/AAoJEBzwKT+lPKRY6ZAQAK5BSg+ilfOs6T9hNtX91h/x
/aZm6dSzncJMyP7gZ1FX2J9wlq+P99lx8FZEkO4gJOVpi/uGqP+nYvZoKydTQ8sb
WbMVLMZBjrR+cP0gnX1sMELKQD7Llq8InYblfY9sE3s+wf8BKX4W2NXYei51vQv9
2k9tdgp7k/ibMu4jbSTnuqrFy67eTYLOJEwqXH6F0zsItwCqGX2njFH/ra4i9oU3
SMyIPNYngC3SYKurTve1cxZpU4J3FuWx/KcLIEIePMNUKU/Ner77tizqNi/xil7b
Dw7VPgPVnD9tavznCd7Fz9HMhi/giG+X1rK9UJ7tnkP8kpdC+RgM0JPTB6nqEgvW
uMJfXWagVcU+Rtmt8smWOpV1VlEMsorqJ8I4OS5DTACt0aFVRsjSXNKRaeLBUUje
JPqRFmHKESksIWwJAnWY7BderGPegWTreDreeAQcvy+6ZkkWxxL925iPd+2aDBhP
hU/p65YnqqPp8qc+HYwtV5aC1UE1CcKXh8VepFnb9z3H7wUe8hSu1PcxqHUhwJXl
OMDjfCGrGs5egdWXqZgQSQKfE9nnhCZqOsKSY+Q5NhBs2P6TKhwv+i0VzdzNKyW8
jKjaoiE3CQEeb1YcPhT7JywChCdL9HKU1xlpY4LfTdIsmz/YngMi4DyWvaAL7dPX
qY7fh/2rVnqrZXm52SzO
=bawW
-END PGP SIGNATURE-

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: Http 2 support in Tomcat

2015-05-15 Thread Mark Thomas
On 15/05/2015 19:23, Christopher Schultz wrote:
 Mark,
 
 On 5/15/15 12:59 PM, Mark Thomas wrote:
 On 15/05/2015 17:49, Christopher Schultz wrote:
 Tony,

 On 5/15/15 12:06 PM, PerfGuru wrote:
 Good news thanks for the update. It may be some time before
 servlet 4 support is released but good to know Tomcat will be
 ready then. But does APR support http/2? I know other web
 servers now do.

 Mark's initial work on the HTTP/2 connector has been using APR.
 Note that APR doesn't handle the HTTP protocol, it just helps
 manage sockets, pools, etc. The protocol needs to be built on top
 of those building blocks. Please see the dev list (archives) for
 details. Just search for HTTP/2 subjects.
 
 Correct. This is primarily because ALPN support is not there in
 JSSE yet and wont be until Java 9. That said, one of the reasons
 for the huge amount of connector refactoring that I did before
 starting on HTTP/2 was so that the connector implementation
 specific code was kept to a minimum (so far just ALPN). HTTP/2 will
 work just fine with NIO and NIO2 just as soon as JSSE support ALPN
 and we plumb it in.
 
 Is this something that's workable with the current pre-release builds
 of Java 9?

I have no idea. I haven't had time to look at it. If you fancy playing
with it ..; ;)

 Presumably, Servlet 4 will require Java 8. Does that mean
 that HTTP/2 with the NIO connectors will only be available with a
 higher JRE version?

The good folks over at Jetty have an ugly hack (involves replacing part
of the JRE) that back-ports the feature to Java 8 so it will be
available that way.

There are other options too.

 h2c support (HTTP/2 over a cleartext channel via HTTP upgrade
 rather than TLS) is also on the TODO list. It shouldn't be much
 work to add (less than a day) and it wil be available for all
 connectors.
 

 Also, I think Tomcat supports websockets which has the
 important capabilities that http/2 has and has been available
 longer.

 Tomcat supports Websocket since Tomcat 7, as long as you are
 running on Java 7 or higher.

 Depending upon your strategy you might want to go with that or
 wait a couple of years for http/2. Remember the firewalls,
 proxies and other network systems have to support http/2 before
 it can reach Tomcat. So it may be by the time http/3 is
 approved.
 
 Tomcat has no choice (application developers do). Servlet 4.0 will 
 require HTTP/2 so Tomcat has to support it.
 
 Correct. Using Websocket through certain proxies (e.g. httpd) is
 even still sometimes tricky.
 
 Yeah. We should touch base with jimjag and discuss this. I think
 the httpd thinking around WebSockets and the Java world thinking
 about WebSockets aren't quite lined up.
 
 +1
 
 Perhaps there isn't much use for Websockets in the Perl or PHP world,
 where a lot of httpd installations are being used.
 
 Jim Riggs's (reprise, I believe) presentation at ApacheCon about how
 mod_php needs to die (paraphrasing) advocates more extensive use of
 mod_proxy_* to physically separate the web tier from the application
 tier, in a way that more closely resembles how Java webapps are
 deployed. Perhaps if the world starts listening to the Jim Riggses of
 the world, the shortcomings of mod_proxy_websocket and friends will
 become more apparent.

+1.

Mark

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: Http 2 support in Tomcat

2015-05-15 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA256

Tony,

On 5/15/15 12:06 PM, PerfGuru wrote:
 Good news thanks for the update. It may be some time before servlet
 4 support is released but good to know Tomcat will be ready then.
 But does APR support http/2? I know other web servers now do.

Mark's initial work on the HTTP/2 connector has been using APR. Note
that APR doesn't handle the HTTP protocol, it just helps manage
sockets, pools, etc. The protocol needs to be built on top of those
building blocks. Please see the dev list (archives) for details. Just
search for HTTP/2 subjects.

 Also, I think Tomcat supports websockets which has the important 
 capabilities that http/2 has and has been available longer.

Tomcat supports Websocket since Tomcat 7, as long as you are running
on Java 7 or higher.

 Depending upon your strategy you might want to go with that or wait
 a couple of years for http/2. Remember the firewalls, proxies and
 other network systems have to support http/2 before it can reach
 Tomcat. So it may be by the time http/3 is approved.

Correct. Using Websocket through certain proxies (e.g. httpd) is even
still sometimes tricky.

- -chris
-BEGIN PGP SIGNATURE-
Version: GnuPG v2
Comment: GPGTools - http://gpgtools.org

iQIcBAEBCAAGBQJVViOkAAoJEBzwKT+lPKRYr30P/10riJrlBEM4jYSvAfnO/DXP
kGf1y5bX6TIgMk1USIrCRMayKNWH/YDRpbOIWA5/dg3tN2Uq1XBANa1hUxmN89KX
+ESKe/jyxZoGayCK3q9V3pTgwixSzGzpSzMsQ37KXQw/yhcYS48sZqbCfMjQ0ajx
8AKWw2tPXbTPen5XXvxWB2SaCfmpVOPuXTxXIqJwOThStOkfMj8ko5yn9A+lNUJp
EDZq4Tk3sLxOpTq9oDKeyweYUxUurj2F0+TZ3Z+lV5BN3/G4WWUcvStS8Zwa5r1f
rQ+mn6Dj3X/pGGS2YmtotlibYB0zFybXKli7zNeXgir0+xprNgF6nm0pu6iZdogx
hBU4ulKi9R66HPPVSBIMpqz5bo4Sg2p7yockIqrMmRP/Wv9VLL53pBOuxFvCvVgd
gYdaVBe71cJDmVNfZpBGMfH0wNd7EZ4WJsCcVZupc6kLWeD/BjIOfGVvRvmKBhuX
DvPFz6WqQpSU5Cs1dZSZ9+uD4dRljToqOXA9TBRSLENaS31PKdVVJW6Fl1sqwK90
7Gr84CIcVS9RyYpnFoR93fDaxgTkus9AxIUa3YfHUde3C6ISwvdw0ioCTfYfli9D
D4HuGou/vB6SniwL6gs1wemq6SBaT0I1CO7fRlOQRb+RI4HkH5YOAzt5FM18OPR6
kzRHzg3egOnSFVF0LiFz
=7HLo
-END PGP SIGNATURE-

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: Http 2 support in Tomcat

2015-05-15 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA256

Tony,

On 5/15/15 2:43 PM, PerfGuru wrote:
 Thanks Mark  Chris this is a very informative. I am using a httpd 
 that supports http/2 and wow is it impressive. Sorry, I had to
 stop using Apache/Tomcat to use it but the performance and
 bandwidth gains are so nice it is addicting and my users have
 noticed.

How does it compare to, say, HTTP/1.1 + Content-Encoding: gzip? I
realize that HTTP/1.1 never compresses the message headers and that
H/2 uses tokens and Huffman Coding to further compress the headers,
but I'd like to see some real-world data if you have it.

What server are you using?

 I will look into jre/jdk 9 and ask Oracle if servlet 4 is in the 
 EA's. I would like to stay with http/2 rather than go to
 websockets but I am an early adopter and if it is stable and has
 servlet 4 with http/2 I will give it a try and let you know the
 results.

When Tomcat 9 goes Stable, HTTP/2 will definitely work. I'm sure there
will be some edge cases that will need to be fixed as time goes on,
but the spec will require H/2 and Tomcat will implement faithfully. We
don't want to merely say oh, yeah, H/2 kinda works and, well, we HAD
to do it, so YMMV. We want to say you can rely on Tomcat to serve
H/2 as well as H/1.

- -chris
-BEGIN PGP SIGNATURE-
Version: GnuPG v2
Comment: GPGTools - http://gpgtools.org

iQIcBAEBCAAGBQJVVlvjAAoJEBzwKT+lPKRY3bwP/1wqb41Eu1fqN80MbrcUUdrJ
qnrWD4o9EsvpPo5Abe0mkGXwiP+F2blDKFRYSXolpuADbmMpsd2gLPjrEGiy6H/J
M6HFbjWPTAt4cIzscSZjAAUrpe05v0M39ZuV7z+nHXjT5UTyZQgmiNn3uvHPbVwQ
DnfwTReswgyi0E5O5Q3qRz32lP49OpZyLgvAEl4N2cd64a+7ScX1eMHpq/NuVuQ8
N+E/GdgsC+UFOO6DYKHNsn8/kOZ1B7oP4e9fmudnBDCXOFTfqB5lsgGRTkvdXQR8
6dJEq8PkkTxPt0tqdd0UAT6FcLU0Axsm/CzNtej5pj5mIUrt9e5PpRPLH8uk1h2/
waq88NyOxJoYKycngubgK/rL1IET7kJ/Nu4f4j4hFDhMxox1w3K9HrMdKogpPYCY
Uh7mdCphpjQxZirkwDnDlwOtbq+t66mNM/DJkeumQ3zfC3fe2wLevnDd7cNOEEx/
fj/r2GbB5p+EtOm67ysAyMc5STdobbueZO/ggBleD2tIiMxOcWE+sXbaXHNzydw4
y9phbm75Q2P8w8EslITnyqyTtbUdyAYJUAhy6nosHXujwwAp+wK+J1yfSzlu4a2w
fLjgp92QsYP5fcA7yyNv0zI0tIREKJwONyL+vd2DD1IGibdxKGssjCtUr0QkhpfT
BXvYpY5JXNoF0YDIEchy
=QGzZ
-END PGP SIGNATURE-

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: Http 2 support in Tomcat

2015-05-15 Thread PerfGuru
Thanks Mark  Chris this is a very informative. I am using a httpd that 
supports http/2 and wow is it impressive. Sorry, I had to stop using 
Apache/Tomcat to use it but the performance and bandwidth gains are so nice it 
is addicting and my users have noticed. I will look into jre/jdk 9 and ask 
Oracle if servlet 4 is in the EA's. I would like to stay with http/2 rather 
than go to websockets but I am an early adaptor and if it is stable and has 
servlet 4 with http/2 I will give it a try and let you know the results. Best 
Regards,-Tony
  From: Mark Thomas ma...@apache.org
 To: Tomcat Users List users@tomcat.apache.org 
 Sent: Friday, May 15, 2015 12:28 PM
 Subject: Re: Http 2 support in Tomcat
   
On 15/05/2015 19:23, Christopher Schultz wrote:
 Mark,
 
 On 5/15/15 12:59 PM, Mark Thomas wrote:
 On 15/05/2015 17:49, Christopher Schultz wrote:
 Tony,

 On 5/15/15 12:06 PM, PerfGuru wrote:
 Good news thanks for the update. It may be some time before
 servlet 4 support is released but good to know Tomcat will be
 ready then. But does APR support http/2? I know other web
 servers now do.

 Mark's initial work on the HTTP/2 connector has been using APR.
 Note that APR doesn't handle the HTTP protocol, it just helps
 manage sockets, pools, etc. The protocol needs to be built on top
 of those building blocks. Please see the dev list (archives) for
 details. Just search for HTTP/2 subjects.
 
 Correct. This is primarily because ALPN support is not there in
 JSSE yet and wont be until Java 9. That said, one of the reasons
 for the huge amount of connector refactoring that I did before
 starting on HTTP/2 was so that the connector implementation
 specific code was kept to a minimum (so far just ALPN). HTTP/2 will
 work just fine with NIO and NIO2 just as soon as JSSE support ALPN
 and we plumb it in.
 
 Is this something that's workable with the current pre-release builds
 of Java 9?

I have no idea. I haven't had time to look at it. If you fancy playing
with it ..; ;)

 Presumably, Servlet 4 will require Java 8. Does that mean
 that HTTP/2 with the NIO connectors will only be available with a
 higher JRE version?

The good folks over at Jetty have an ugly hack (involves replacing part
of the JRE) that back-ports the feature to Java 8 so it will be
available that way.

There are other options too.

 h2c support (HTTP/2 over a cleartext channel via HTTP upgrade
 rather than TLS) is also on the TODO list. It shouldn't be much
 work to add (less than a day) and it wil be available for all
 connectors.
 

 Also, I think Tomcat supports websockets which has the
 important capabilities that http/2 has and has been available
 longer.

 Tomcat supports Websocket since Tomcat 7, as long as you are
 running on Java 7 or higher.

 Depending upon your strategy you might want to go with that or
 wait a couple of years for http/2. Remember the firewalls,
 proxies and other network systems have to support http/2 before
 it can reach Tomcat. So it may be by the time http/3 is
 approved.
 
 Tomcat has no choice (application developers do). Servlet 4.0 will 
 require HTTP/2 so Tomcat has to support it.
 
 Correct. Using Websocket through certain proxies (e.g. httpd) is
 even still sometimes tricky.
 
 Yeah. We should touch base with jimjag and discuss this. I think
 the httpd thinking around WebSockets and the Java world thinking
 about WebSockets aren't quite lined up.
 
 +1
 
 Perhaps there isn't much use for Websockets in the Perl or PHP world,
 where a lot of httpd installations are being used.
 
 Jim Riggs's (reprise, I believe) presentation at ApacheCon about how
 mod_php needs to die (paraphrasing) advocates more extensive use of
 mod_proxy_* to physically separate the web tier from the application
 tier, in a way that more closely resembles how Java webapps are
 deployed. Perhaps if the world starts listening to the Jim Riggses of
 the world, the shortcomings of mod_proxy_websocket and friends will
 become more apparent.

+1.

Mark

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



  

Re: Http 2 support in Tomcat

2015-05-15 Thread Mark Thomas
On 15/05/2015 17:49, Christopher Schultz wrote:
 Tony,
 
 On 5/15/15 12:06 PM, PerfGuru wrote:
 Good news thanks for the update. It may be some time before servlet
 4 support is released but good to know Tomcat will be ready then.
 But does APR support http/2? I know other web servers now do.
 
 Mark's initial work on the HTTP/2 connector has been using APR. Note
 that APR doesn't handle the HTTP protocol, it just helps manage
 sockets, pools, etc. The protocol needs to be built on top of those
 building blocks. Please see the dev list (archives) for details. Just
 search for HTTP/2 subjects.

Correct. This is primarily because ALPN support is not there in JSSE yet
and wont be until Java 9. That said, one of the reasons for the huge
amount of connector refactoring that I did before starting on HTTP/2 was
so that the connector implementation specific code was kept to a minimum
(so far just ALPN). HTTP/2 will work just fine with NIO and NIO2 just as
soon as JSSE support ALPN and we plumb it in.

h2c support (HTTP/2 over a cleartext channel via HTTP upgrade rather
than TLS) is also on the TODO list. It shouldn't be much work to add
(less than a day) and it wil be available for all connectors.

 
 Also, I think Tomcat supports websockets which has the important
 capabilities that http/2 has and has been available longer.
 
 Tomcat supports Websocket since Tomcat 7, as long as you are running
 on Java 7 or higher.
 
 Depending upon your strategy you might want to go with that or wait
 a couple of years for http/2. Remember the firewalls, proxies and
 other network systems have to support http/2 before it can reach
 Tomcat. So it may be by the time http/3 is approved.

Tomcat has no choice (application developers do). Servlet 4.0 will
require HTTP/2 so Tomcat has to support it.

 Correct. Using Websocket through certain proxies (e.g. httpd) is even
 still sometimes tricky.

Yeah. We should touch base with jimjag and dicuss this. I think the
httpd thinking around WebSockets and the Java world thinking about
WebSockets aren't quite lined up.

Mark

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: Http 2 support in Tomcat

2015-05-15 Thread Rainer Jung

Am 15.05.2015 um 20:43 schrieb PerfGuru:

Thanks Mark  Chris this is a very informative. I am using a httpd that 
supports http/2 and wow is it impressive. Sorry, I had to stop using Apache/Tomcat 
to use it but the performance and bandwidth gains are so nice it is addicting and 
my users have noticed. I will look into jre/jdk 9 and ask Oracle if servlet 4 is in 
the EA's. I would like to stay with http/2 rather than go to websockets but I am an 
early adaptor and if it is stable and has servlet 4 with http/2 I will give it a 
try and let you know the results. Best Regards,-Tony


Note that web socket and HTTP/2 serve very different purposes. Web 
sockets provide you basically with a socket you can use for setting up 
your own protocol and get rid of request/response semantics. Web socket 
allow to set up asynchoneous communication.


HTTP/2 more or less has the same request/response semantics as HTTP. It 
is onyl a more efficient implementation of that by combining multiple 
request/response streams into one TCP connection, using header 
compression etc. etc. HTTP/2 is still synchroneous. Yes, there is a 
notion of server push, but push in HTTP/2 is very different from what 
one would name a push in the web socket world.


I think it would be better to clearly keep the two terms web socket and 
HTTP/2 separated.


Regards,

Rainer




-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org