These are chat archives for spring-cloud/spring-cloud

20th
Nov 2018
Hugh Hamill
@hughwphamill
Nov 20 2018 00:03
@spencergibb Is it performant to intercept the response body and alter it, e.g. insert a value in a placeholder like {{placeholder}} gets replaced with "some environment value" ?
or does it involve reading the whole response body into memory?
My use case is to expose a microservice's spring-restdocs generated documentation through the gateway, but alter the scheme/host/port based on which gateway is exposing it
I could configure the host and port in restdocs to be something like {{host}} and {{port}} and replace those strings with the configured values on each gateway
I have one gateway for UI consumption and another for programmatic access from external clients
in spring-cloud-gateway
Spencer Gibb
@spencergibb
Nov 20 2018 01:42
performat is relative. The gateway will then be memory bound.
Sourabh Sharma
@sharmasourabh
Nov 20 2018 06:52

Thanks @spencergibb for sharing the details.

@sharmasourabh Greenwich will be 2.1.0 compatible and java 11

Hugh Hamill
@hughwphamill
Nov 20 2018 10:16
Is it possible to intercept the stream and process it in a buffer, rather than loading up the whole response? Still memory bound but not as bad as reading the whole stream I'd think
Srini555
@Srini555
Nov 20 2018 13:49
Hi