Commit Graph

407 Commits

Author SHA1 Message Date
Dave Syer
9fe69cc80a Merge pull request #258 from sampengilly/master
Added additional Gradle tip to Eureka Server documentation.
2015-03-16 13:31:45 +00:00
sampengilly
a2b0b70b55 Added additional Gradle tip to Eureka Server documentation. Tip covers the usage of the spring dependency management plugin in order to prevent fatal crashes during application startup. 2015-03-16 21:05:52 +10:00
Dave Syer
9357bdd9db Remove log4j notes since Eureka no longer requires it 2015-03-13 17:15:08 +00:00
Dave Syer
0391cfff65 Allow streaming of multipart requests in Zuul proxy
It turns out that the suckiness of Zuul with multipart requests
comes almost entirely from the Multipart handling in Spring's
DispatcherServlet. This change makes the proxy routes available
on an alternative path /zuul/<normal_path> (where
/zuul is the default value of zuul.servletPath). I have
tested those with 800MB file uploads using the main method in
the FormZuulServletProxyApplicationTests and the main
observation is that there is no OutOfMemory error (no-one tries
to download the complete request body). It works with Ribbon
and with the simple (HttpClient) filter. With Ribbon you
will need to set some timeouts if you want to upload files
as large as that, e.g. see application.yml in the tests:

hystrix.command.default.execution.isolation.thread.timeoutInMilliseconds: 60000
ribbon:
  ConnectTimeout: 3000
  ReadTimeout: 60000

You need to set "Transfer-Encoding: chunked" in the
incoming request. Chrome does not do this by default
apparently, but I was able to test with curl, e.g.

$ curl -v -H "Transfer-Encoding: chunked" \
  -F "file=@mylarg.iso" \
  localhost:9999/zuul/direct/file

The old proxy paths through the DispatcherServlet are still
available (for backwards compatibility and for convenience of
having the paths available at the root of the context path).

Fixes gh-254
2015-03-13 16:55:30 +00:00
Dave Syer
da4f5d3454 Fix issue with servlet request wrappers in Zuul
Because of the way that a FormBodyServletRequestWrapper was
implemented (extending the Zuul servlet 2.5 wrapper) it could
barf at runtime if anyone called its servlet 3.0 methods. The fix
for that was to extract our Servlet30RequestWrapper and extend that
instead.

Also tweaked the DebugFilter a bit so it doesn't try and display
the whole payload. Probably speeds up file uploads a bit but the
fact that we have to store the whole request body in memory is
going to kill us eventually.

See gh-254
2015-03-13 13:07:33 +00:00
Spencer Gibb
e2583f5380 upgrade Ribbon to version 2.0.0.
From 2.0.RC13

fixes gh-216
2015-03-06 12:47:27 -07:00
Spencer Gibb
df7abd1bc9 added test ReadTimeout parameter 2015-03-06 12:20:02 -07:00
Dave Syer
164c9f8755 Add bintray properties 2015-03-06 10:48:29 +00:00
Spencer Gibb
384fad6c40 wrap SpringLBClientFactory in a CachingLBClientFactory so LBClients are reused.
fixes gh-240
2015-03-05 12:39:22 -07:00
Spencer Gibb
4bd7c3bdcf upgrade feign to 7.3.0
fixes gh-243
2015-03-05 11:42:09 -07:00
Spencer Gibb
4e795ea783 upgrade hystrix to 1.4.0
fixes gh-242
2015-03-03 17:23:26 -07:00
Dave Syer
e3a20d5d6b Update to next snapshot 2015-03-03 14:56:26 +00:00
Spencer Gibb
7b6f14805d return null for choose() rather than throw an illegal argument exception.
fixes gh-236
2015-03-02 09:44:11 -07:00
Dave Syer
ab714bd970 Add release profile for distribution management 2015-02-27 15:49:52 +00:00
Dave Syer
2d35ae1632 Back to configure->config 2015-02-27 15:23:51 +00:00
Dave Syer
7e579c9a91 Use method accessor not field 2015-02-27 12:38:39 +00:00
Dave Syer
8ac43cca52 Add @*ConnectionFactory to qualify the preferred instance
If you are using AMQP there needs to be a ConnectionFactory (from
Spring Rabbit) in the application context. If there is a single
ConnectionFactory it will be used, or if there is a one qualified as
@[Hystrix,Turbine]ConnectionFactory it will be preferred over others,
otherwise the @Primary one will be used. If there are multiple
unqualified connection factories there will be an error.

See https://github.com/spring-cloud/spring-cloud-bus/issues/13
2015-02-27 12:32:41 +00:00
Dave Syer
a954e88fc6 Config package name change 2015-02-25 17:12:50 +00:00
Dave Syer
e096fd8e05 Move RibbonInterceptor into commons
It didn't depend on Ribbon at all so it can live in the commons
project.
2015-02-25 14:58:36 +00:00
Dave Syer
e6f30ebfce Exclude mockito-all from zuul 2015-02-25 14:25:11 +00:00
Dave Syer
0b8f85529c Refresh health indicator for config server if present
Listen for heartbeats from discovery so that state changes can trigger
a new status (and the client doesn't rely on the old address of the
server if it has now changed).

Fixes gh-232
2015-02-25 09:17:40 +00:00
Spencer Gibb
dafb5ecf09 only set EurekaInstanceConfigBean.nonSecurePort in EurekaClientAutoConfiguration
fixes gh-225
2015-02-23 11:57:32 -07:00
Dave Syer
8b81eb8b2c Tweak autoconfig for feign
It doesn't make sense to @EnableFeignClients in autoconfig
because the user needs to specify a package to scan. It does
make sense (sort of) to set up the encoder/decoder/logger etc.

See gh-226
2015-02-23 17:23:05 +00:00
Dave Syer
1d35804831 Retain scheme (e.g. https) in URL from @FeignClient
When the URL is passed down to Ribbon and reconstructed from
a LoadBalancer the Server only knows about host and port, so the scheme
has to come from the original declaration.

There's still a potential problem with Eureka remote services that
are available with a non-secure port as well (probably fairly rare).

Fixes gh-221
2015-02-23 10:02:51 +00:00
Spencer Gibb
9623c83885 added docs on exposing /hystrix.stream 2015-02-19 10:26:50 -07:00
Roy Clarkson
b6faa0e087 Fix spelling of 'broker' 2015-02-18 14:58:49 -08:00
Dave Syer
fadfc67f8f Add some more docs for Eureka metadata
Users need to know how to configure and use the Eureka
metadata because it isn't immediately obvious and does
require some decisions to be made.

Fixes gh-102
2015-02-16 10:31:36 +00:00
Spencer Gibb
3c8568942d added a little to s-c-n-turbine-amqp
fixes spring-cloud/spring-cloud-bus/issues/7
2015-02-14 13:24:57 -07:00
Spencer Gibb
4754a1e160 an attempt at some sidecar documentation
fixes gh-201
2015-02-13 14:45:30 -07:00
Spencer Gibb
fc7cc4916e remove netflix bintray maven repo as blitz4j 1.36.0 is in maven central 2015-02-13 14:10:25 -07:00
Spencer Gibb
572f97e135 remove getAllInstances 2015-02-13 13:30:25 -07:00
Spencer Gibb
f49d99ef5b Pass LB IClientConfig to executeWithLoadBalancer
fixes 208
2015-02-13 12:33:01 -07:00
Spencer Gibb
149cc7d760 Implement ServiceInstance.{getUri,isSecure}
fixes gh-210
2015-02-13 11:29:59 -07:00
Dave Syer
043732aef3 More careful handling of multipart data in proxy
To write file data the message converter needs the file content
to be provided in the form of an HttpEntity per file.

Fixes gh-197 again
2015-02-12 18:37:54 +00:00
Spencer Gibb
2d8085cc24 fix the base href of the hystrix dashboard pages
fixes gh-204
2015-02-10 11:31:16 -07:00
Spencer Gibb
24a06ca630 only update route location if location is empty. Fixes bug introduced in 18b346def1 2015-02-09 21:08:21 -07:00
Spencer Gibb
18b346def1 update the serviceId and location for statically configured routes that are also part of serviceDiscovery.
fixes gh-199
2015-02-09 17:30:23 -07:00
Dave Syer
96335e1d24 Fix broken test 2015-02-09 17:00:22 +00:00
Dave Syer
c9b4761544 More defensive exception handling 2015-02-09 16:39:14 +00:00
Dave Syer
8dd9b830e0 Add logic for servlet prefix in ProxyRouteLocator
If the ServerProperties contain a servletPath then the handler mapping
does not contain that prefix, but the incoming request URI does. This leads
to some interesting prefix stripping gymnastics. All the existing tests
assumed that the prefix was empty (the default for a Spring boot app).

See gh-199
2015-02-09 15:04:54 +00:00
Dave Syer
6f569976e8 Avoid NPE if discovery is not available yet 2015-02-06 17:54:50 +00:00
Spencer Gibb
06d0bbe779 add netflixoss bintray 2015-02-05 14:19:02 -07:00
Spencer Gibb
94b0b7b692 add additional /hystrix.stream endpoint integration test 2015-02-05 14:18:44 -07:00
Spencer Gibb
27c418825d Revert "move /hystrix.stream from an endpoint to a servlet"
This reverts commit 29bee28db5.
2015-02-05 13:08:32 -07:00
Dave Syer
29383de8c1 Allow zuul.ignoredServices to be a pattern
and also allow explicitly configured services to be unignored. I.e.

zuul:
  ignoredServices: *
  routes:
    foo: /foo/**

Will expose only the foo service.

Fixes gh-198
2015-02-05 17:00:17 +00:00
Dave Syer
b8cf89fb45 Use an HttpMessageConverter for form body
Instead of building a String, if we use an existing
HttpMessageConverter from Spring web, we can support multipart
form data.

Fixes gh-197 (hopefully)
2015-02-05 16:32:33 +01:00
Dave Syer
069afb2a73 Use logback by default in Eureka server
Now that blitz4j 1.36.0 is out, with a bit of hackery we can prevent
it from barfing on startup. Seems worth it (and certainly makes
it easier to embed Eureka server).

Fixes gh-3
2015-02-05 12:01:12 +01:00
Dave Syer
be0c2287ae Documentation for status page and health URL paths
The Eureka instance has to provide status page and health check
URLs. We only provide a sensible default if the app is a vanilla
Actuator. This change shows users explicitly how to customize those
settings.

Fixes gh-192
2015-02-04 15:57:45 +01:00
Dave Syer
00a951c1f1 Clarify status of @EnableEurekaClient
Fixes gh-194
2015-02-04 15:50:18 +01:00
Julien Roy
00b689f58a Add retryable property on Zuul route configuration
The ProxyRouteLocator now has a retryable property (default
null which means Ribbon will choose the default - usually false).

Fixes gh-115, fixes gh-124
2015-02-04 15:02:49 +01:00