From 68fa6afa1701bd1576f8b46c119036d78fd76a26 Mon Sep 17 00:00:00 2001 From: Jakub Narloch Date: Thu, 8 Oct 2015 22:00:43 +0200 Subject: [PATCH] Feign compression documentation --- .../main/asciidoc/spring-cloud-netflix.adoc | 24 ++++++++++++++++++- 1 file changed, 23 insertions(+), 1 deletion(-) diff --git a/docs/src/main/asciidoc/spring-cloud-netflix.adoc b/docs/src/main/asciidoc/spring-cloud-netflix.adoc index 6e435916..9f8d90a4 100644 --- a/docs/src/main/asciidoc/spring-cloud-netflix.adoc +++ b/docs/src/main/asciidoc/spring-cloud-netflix.adoc @@ -126,7 +126,7 @@ application Spring Boot Actuator current health check status. Which means that after successful registration Eureka will always announce that the application is in 'UP' state. This behaviour can be altered by enabling Eureka health checks, which results in propagating application status -to Eureka, as a consequence every other application will not sending +to Eureka. As a consequence every other application won't be sending traffic to application in state other then 'UP'. .application.yml @@ -864,6 +864,28 @@ public interface UserClient extends UserService { } ---- +=== Feign request/response compression + +You may consider enabling the request or response GZIP compression for your +Feign requests. You can do this by enabling one of the properties: + +[source,java] +---- +feign.compression.request.enabled=true +feign.compression.response.enabled=true +---- + +Feign request compression gives you settings similar to what you may set for your web server: + +[source,java] +---- +feign.compression.request.enabled=true +feign.compression.request.mime-types=text/xml,application/xml,application/json +feign.compression.request.min-request-size=2048 +---- + +These properties allow you to be selective about the compressed media types and minimum request threshold length. + == External Configuration: Archaius https://github.com/Netflix/archaius[Archaius] is the Netflix client side configuration library. It is the library used by all of the Netflix OSS components for configuration. Archaius is an extension of the http://commons.apache.org/proper/commons-configuration[Apache Commons Configuration] project. It allows updates to configuration by either polling a source for changes or for a source to push changes to the client. Archaius uses DynamicProperty classes as handles to properties.