Giter VIP home page Giter VIP logo

Comments (41)

iceflower avatar iceflower commented on May 14, 2024 10

reactor-netty has officially distributed v1.0. (relase note link)

reactor-netty v1.0 supports http/2

Now, it's time for Spring-cloud-gateway to support http/2 .

from spring-cloud-gateway.

Inego avatar Inego commented on May 14, 2024 5

Why was the issue closed?

from spring-cloud-gateway.

michallaskowski avatar michallaskowski commented on May 14, 2024 5

reactor/reactor-netty#1147, that promised HTTP/2 support, was merged today. But there is a new issue for enhancements, not sure if needed here : reactor/reactor-netty#1169

from spring-cloud-gateway.

csterwa avatar csterwa commented on May 14, 2024 4

@spencergibb is there any work to get HTTP/2 working with Spring Cloud Gateway?

from spring-cloud-gateway.

MilgoTest avatar MilgoTest commented on May 14, 2024 3

Any plans to implement HTTP2 soon?

from spring-cloud-gateway.

spencergibb avatar spencergibb commented on May 14, 2024 2

we are waiting on reactor-netty 0.8 which is in progress.

from spring-cloud-gateway.

spencergibb avatar spencergibb commented on May 14, 2024 2

It's high on the list once the blocker goes away. It will be http2 specific, no subprotocols (ie grpc).

from spring-cloud-gateway.

spencergibb avatar spencergibb commented on May 14, 2024 1

@violetagg anything gateway needs to do specifically to support http2 in gateway with http client?

from spring-cloud-gateway.

spencergibb avatar spencergibb commented on May 14, 2024 1

Looks like this is all unblocked now https://docs.spring.io/spring-boot/docs/current/reference/htmlsingle/#howto-configure-http2-netty

from spring-cloud-gateway.

spencergibb avatar spencergibb commented on May 14, 2024

I believe this is blocked by reactor-netty (@smaldini is that correct?) on the one side and #145 on the other.

from spring-cloud-gateway.

yamen23ali avatar yamen23ali commented on May 14, 2024

still no support for http2, right ?

from spring-cloud-gateway.

medalliaerlich avatar medalliaerlich commented on May 14, 2024

Once reactor-netty 0.8 is released, will it be enough to update netty dependency version?

from spring-cloud-gateway.

spencergibb avatar spencergibb commented on May 14, 2024

no, there will need to be a corresponding gateway release.

from spring-cloud-gateway.

medalliaerlich avatar medalliaerlich commented on May 14, 2024

Hi, thanks for the quick response.
And do we know how long would it take once the reactor-netty release is available to have, at least, an RC with HTTP 2 in the gateway?

from spring-cloud-gateway.

spencergibb avatar spencergibb commented on May 14, 2024

No, I'm afraid not

from spring-cloud-gateway.

hero-zhanghao avatar hero-zhanghao commented on May 14, 2024

@spencergibb
Do gateway now support HTTP2?I don't have the documentation, or the plan?

from spring-cloud-gateway.

spencergibb avatar spencergibb commented on May 14, 2024

You will have to watch reactor/reactor-netty#104

from spring-cloud-gateway.

hero-zhanghao avatar hero-zhanghao commented on May 14, 2024

I see that reactor netty has already released a version that supports HTTP2, so which version of the gateway is available?

from spring-cloud-gateway.

spencergibb avatar spencergibb commented on May 14, 2024

It has not

from spring-cloud-gateway.

spencergibb avatar spencergibb commented on May 14, 2024

It is all based on reactor Netty

from spring-cloud-gateway.

hero-zhanghao avatar hero-zhanghao commented on May 14, 2024

What does that mean?This is still blocked by reactor netty, right?

from spring-cloud-gateway.

spencergibb avatar spencergibb commented on May 14, 2024

Yes, it is blocked by reactor Netty

from spring-cloud-gateway.

MilgoTest avatar MilgoTest commented on May 14, 2024

I didn't think you'd need client side support of Netty for HTTP/2.

from spring-cloud-gateway.

benjamineckstein avatar benjamineckstein commented on May 14, 2024

Any news on this? HTTP2 support is now enabled on serverside by netty.

from spring-cloud-gateway.

nabilgasri avatar nabilgasri commented on May 14, 2024

Hello,
Do you know when we can expect HTTP2 support?

from spring-cloud-gateway.

spencergibb avatar spencergibb commented on May 14, 2024

This is now blocked on reactor/reactor-netty#639

from spring-cloud-gateway.

patpatpat123 avatar patpatpat123 commented on May 14, 2024

Hello,

Cheering for you here. Any update?
Just saying, but our team refactored 20+ micro services from Webflux http to Webflux http2 + https with ssl.

Then, we started to refactor our gateway service, which is in front of our 20+ micro services, to realize http2 is not possible :'D

Thank you!

from spring-cloud-gateway.

aosorio1 avatar aosorio1 commented on May 14, 2024

Any updates on this? I'm so interested in this.

from spring-cloud-gateway.

spencergibb avatar spencergibb commented on May 14, 2024

No, when there are updates you will see them here.

from spring-cloud-gateway.

kiranmaiem avatar kiranmaiem commented on May 14, 2024

Hi,

I am also waiting to know when HTTP2 will be supported on SCG. Any plans for the same?

from spring-cloud-gateway.

spencergibb avatar spencergibb commented on May 14, 2024

No change from my comment above

from spring-cloud-gateway.

mostroverkhov avatar mostroverkhov commented on May 14, 2024

@spencergibb I understand this is blocked by reactor-netty clientside http2 support - but how It would be prioritized if technical blocker goes away? Is It still on roadmap? Will http2 streams be supported end-to-end, or GRPC only - to be on par with standalone proxies (nginx, kong, haproxy have this for few years) and meshes out there.

from spring-cloud-gateway.

PMacho avatar PMacho commented on May 14, 2024

@spencergibb FYI: Without knowing about this issue, I just tried to enable http2 on spring cloud gateway (server.http2.enabled=true). It seemed not too bad. However, the x-http2-scheme=[https] header was ignored and thus spring security's OAUTH implementation didn't work, since gateway rewrote all requests to http. Thus, redirect_uri check failed, plus downstream requests where also rewritten to http and hence SSL verification failed downstream.

from spring-cloud-gateway.

DasAmpharos avatar DasAmpharos commented on May 14, 2024

@spencergibb I found this documentation in the reactor-netty documentation that describes how to use http2 with NettyWebServer and with HttpClient

from spring-cloud-gateway.

spencergibb avatar spencergibb commented on May 14, 2024

I'm well aware. It's spring boot that needs to support it. I can't remember if that is in place

from spring-cloud-gateway.

DasAmpharos avatar DasAmpharos commented on May 14, 2024

@spencergibb tried enabling HTTP2 in my gateway application. Whenever I attempt to route a gRPC call through the gateway I'm getting the following exception:

java.lang.UnsupportedOperationException: unsupported message type: DefaultHttpRequest (expected: ByteBuf, FileRegion)
	at io.netty.channel.nio.AbstractNioByteChannel.filterOutboundMessage(AbstractNioByteChannel.java:286)
	at io.netty.channel.AbstractChannel$AbstractUnsafe.write(AbstractChannel.java:878)
	at io.netty.channel.DefaultChannelPipeline$HeadContext.write(DefaultChannelPipeline.java:1367)
	at io.netty.channel.AbstractChannelHandlerContext.invokeWrite0(AbstractChannelHandlerContext.java:717)
	at io.netty.channel.AbstractChannelHandlerContext.invokeWrite(AbstractChannelHandlerContext.java:709)
	at io.netty.channel.AbstractChannelHandlerContext.write(AbstractChannelHandlerContext.java:792)
	at io.netty.channel.AbstractChannelHandlerContext.write(AbstractChannelHandlerContext.java:702)
	at io.netty.handler.logging.LoggingHandler.write(LoggingHandler.java:279)
	at io.netty.channel.AbstractChannelHandlerContext.invokeWrite0(AbstractChannelHandlerContext.java:717)
	at io.netty.channel.AbstractChannelHandlerContext.invokeWriteAndFlush(AbstractChannelHandlerContext.java:764)
	at io.netty.channel.AbstractChannelHandlerContext.write(AbstractChannelHandlerContext.java:790)
	at io.netty.channel.AbstractChannelHandlerContext.writeAndFlush(AbstractChannelHandlerContext.java:758)
	at io.netty.channel.AbstractChannelHandlerContext.writeAndFlush(AbstractChannelHandlerContext.java:808)
	at io.netty.channel.DefaultChannelPipeline.writeAndFlush(DefaultChannelPipeline.java:1025)
	at io.netty.channel.AbstractChannel.writeAndFlush(AbstractChannel.java:294)
	at reactor.netty.http.HttpOperations.lambda$then$2(HttpOperations.java:200)
	at reactor.netty.FutureMono$DeferredFutureMono.subscribe(FutureMono.java:114)
	at reactor.core.publisher.Mono.subscribe(Mono.java:4213)
	at reactor.core.publisher.MonoIgnoreThen$ThenIgnoreMain.drain(MonoIgnoreThen.java:172)
	at reactor.core.publisher.MonoIgnoreThen.subscribe(MonoIgnoreThen.java:56)
	at reactor.core.publisher.Mono.subscribe(Mono.java:4213)
	at reactor.netty.NettyOutbound.subscribe(NettyOutbound.java:336)
	at reactor.core.publisher.MonoSource.subscribe(MonoSource.java:65)
	at reactor.core.publisher.MonoDefer.subscribe(MonoDefer.java:52)
	at reactor.netty.http.client.HttpClientConnect$HttpIOHandlerObserver.onStateChange(HttpClientConnect.java:446)
	at reactor.netty.ReactorNetty$CompositeConnectionObserver.onStateChange(ReactorNetty.java:518)
	at reactor.netty.resources.PooledConnectionProvider$DisposableAcquire.onStateChange(PooledConnectionProvider.java:561)
	at reactor.netty.resources.PooledConnectionProvider$PooledConnection.onStateChange(PooledConnectionProvider.java:448)
	at reactor.netty.channel.ChannelOperationsHandler.channelActive(ChannelOperationsHandler.java:65)
	at io.netty.channel.AbstractChannelHandlerContext.invokeChannelActive(AbstractChannelHandlerContext.java:230)
	at io.netty.channel.AbstractChannelHandlerContext.invokeChannelActive(AbstractChannelHandlerContext.java:216)
	at io.netty.channel.AbstractChannelHandlerContext.fireChannelActive(AbstractChannelHandlerContext.java:209)
	at io.netty.handler.logging.LoggingHandler.channelActive(LoggingHandler.java:189)
	at io.netty.channel.AbstractChannelHandlerContext.invokeChannelActive(AbstractChannelHandlerContext.java:230)
	at io.netty.channel.AbstractChannelHandlerContext.invokeChannelActive(AbstractChannelHandlerContext.java:216)
	at io.netty.channel.AbstractChannelHandlerContext.fireChannelActive(AbstractChannelHandlerContext.java:209)
	at io.netty.channel.DefaultChannelPipeline$HeadContext.channelActive(DefaultChannelPipeline.java:1398)
	at io.netty.channel.AbstractChannelHandlerContext.invokeChannelActive(AbstractChannelHandlerContext.java:230)
	at io.netty.channel.AbstractChannelHandlerContext.invokeChannelActive(AbstractChannelHandlerContext.java:216)
	at io.netty.channel.DefaultChannelPipeline.fireChannelActive(DefaultChannelPipeline.java:895)
	at io.netty.channel.nio.AbstractNioChannel$AbstractNioUnsafe.fulfillConnectPromise(AbstractNioChannel.java:305)
	at io.netty.channel.nio.AbstractNioChannel$AbstractNioUnsafe.finishConnect(AbstractNioChannel.java:335)
	at io.netty.channel.nio.NioEventLoop.processSelectedKey(NioEventLoop.java:707)
	at io.netty.channel.nio.NioEventLoop.processSelectedKeysOptimized(NioEventLoop.java:655)
	at io.netty.channel.nio.NioEventLoop.processSelectedKeys(NioEventLoop.java:581)
	at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:493)
	at io.netty.util.concurrent.SingleThreadEventExecutor$4.run(SingleThreadEventExecutor.java:989)
	at io.netty.util.internal.ThreadExecutorMap$2.run(ThreadExecutorMap.java:74)
	at io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30)
	at java.base/java.lang.Thread.run(Thread.java:834)

Is there extra work that is required to enable this or should setting the protocol in the NettyServerCustomizer and the HttpClientCustomizer be enough?

from spring-cloud-gateway.

spencergibb avatar spencergibb commented on May 14, 2024

I don't know

from spring-cloud-gateway.

yhilem avatar yhilem commented on May 14, 2024

In my case the client supports HTTP/2 (https://github.com/IBM/cloudant-java-sdk) but the backend does not support HTTP/2 (apache/couchdb#1497).
The HTTP/1.1 backend service (couchdb) is exposed via Spring Cloud Gateway and the users/clients communicate with the backend service via HTTP/2 protocol through the Spring Cloud Gateway.
Is this configuration supported ?

from spring-cloud-gateway.

spencergibb avatar spencergibb commented on May 14, 2024

Terminating http 2 and switching to http 1.x is out of scope for this issue. Please open a new issue for us to consider.

from spring-cloud-gateway.

qqeasonchen avatar qqeasonchen commented on May 14, 2024

Hi, when is the 2021.0.0-M2 release? it seems has no pr corresponding to it yet.

from spring-cloud-gateway.

aalansehaiyang avatar aalansehaiyang commented on May 14, 2024

hi,Does grpc routing and forwarding support? @spencergibb

from spring-cloud-gateway.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.