scalecube / scalecube-gateway

ScaleCube API Gateway is the single entry point for service consumers. handles incoming requests and proxy/route to the appropriate microservice instance.
Apache License 2.0
18 stars 7 forks source link

Remove GatewayClientSettings, create more flexible configuration api #144

Open artem-v opened 4 years ago

artem-v commented 4 years ago

Motivation

io.scalecube.services.gateway.transport.GatewayClientSettings becomes less and less flexible. It was expected to be generic settings class for any transport. But with time it becomes more clear that it was mistake to think in this direction, because it's impossible to have transport-agnostic configuration. It's already clear that followRedirect is for http transport (so we leaked http to configuration => configration is not generic), keepAliveInterval is for websocket transport (so we leaked wesocket to configuration level => so configuration is not generic).

Plus new settings are comming: for http it has to be possible to specify custom ConnectionProvider (.newConnection() or .builder() for settings such as maxConnections maxIdleTime maxLifeTime pendingAcquireTimeout)(io.scalecube.services.gateway.transport.http.HttpGatewayClient line 43), for websocket client must have ability to specify settings for reactor.netty.http.client.WebsocketClientSpec (because client very much might want to setup maxFramePayloadLength protocols proxyPing compress).

Expected updates