有没有办法将Netflix服务发现服务器(Eureka)与不同的编程语言(例如php)集成.例如,我们想在php中创建一个服务发现客户端.
在此先感谢您的帮助.
我正在开发Spring Boot应用程序。
我想知道如何将负载平衡器放置在应用程序的前面,以便在一些服务器上分配负载。
我在Google上搜索后发现,有一些Netflix API,例如Eureka,Hystrix,Ribbon和Archaius,将有助于完成劳德平衡工作。
但是找不到这些术语如何帮助同时分配请求和平衡负载,从而为所有访问特定服务的用户提供高可靠性和可用性。
我将尽管所有这些,但无法找到启动的入口点。其实我不是从哪里开始。
cluster-computing netflix spring-boot netflix-feign netflix-eureka
我们拥有一个拥有自己的API网关,服务发现和负载平衡的基础架构.但是出于弹性目的,我需要使用Hystrix.
我使用Spring boot + Eureka + Feign客户端将请求从一个发现的服务器转发到另一个服务器,它工作正常.
在我的服务器中,我需要获取原始用户的IP.
我似乎无法找到如何配置Feign客户端自动编辑'X-Forwarded-For'标头,以便我能够提取原始用户的IP地址.
当我使用getRemoteAddr()时,我得到代理IP地址(正如预期的那样).当试图提取request.getHeader("X-Forwarded-For")时,我总是得到null.
我应该在哪里添加/配置此功能?
我们通过在eureka服务注册表中注册了多个实例来扩展我们系统中的所有服务.
此外,它们还由前面的zuul服务器代理.
我的问题是,当从客户端访问时,我们如何确保zuul代理的可伸缩性.
我能想到的一个解决方案是在eureka注册表中注册多个代理实例.但是,如果这样做,我们如何决定将哪些实例暴露给客户端.
我正和尤里卡做一个POC.当我关闭服务实例时,它目前需要大约3分钟才能在Eureka控制台中显示.我假设(但不自信)这也意味着这个被击落的实例仍然可以被客户发现?
通过调试,我可以看到服务器多次运行evict任务,然后确定我关闭的实例上的租约已过期.
我的设置是客户端:
eureka.client.serviceUrl.defaultZone=http://localhost:8761/eureka/
eureka.instance.statusPageUrlPath=${management.context-path}/info
eureka.instance.healthCheckUrlPath=${management.context-path}/health
eureka.instance.leaseRenewalIntervalInSeconds=5
eureka.client.healthcheck.enabled=true
eureka.client.lease.duration=2
eureka.client.leaseExpirationDurationInSeconds=5
logging.level.com.netflix.eureka=DEBUG
logging.level.com.netflix.discovery=DEBUG
Run Code Online (Sandbox Code Playgroud)
服务器:
server.port=8761
eureka.client.register-with-eureka=false
eureka.client.fetch-registry=false
logging.level.com.netflix.eureka=DEBUG
logging.level.com.netflix.discovery=DEBUG
eureka.server.enableSelfPreservation=false
Run Code Online (Sandbox Code Playgroud)
我也在服务器上尝试过这些设置:
eureka.server.response-cache-update-interval-ms: 500
eureka.server.eviction-interval-timer-in-ms: 500
Run Code Online (Sandbox Code Playgroud)
这些似乎增加了检查但不减少服务器识别实例的时间减少.
我错过了一个设置吗?是否有最佳实践来关闭生产中的实例以立即获得此实例?
谢谢!
尝试使用Eureka服务器运行Spring Boot 1.4.2.RELEASE时出现以下错误:
2016-11-20 16:25:59.306 INFO 14263 --- [ main] s.c.a.AnnotationConfigApplicationContext : Refreshing org.springframework.context.annotation.AnnotationConfigApplicationContext@2177849e: startup date [Sun Nov 20 16:25:59 CET 2016]; root of context hierarchy
2016-11-20 16:25:59.581 INFO 14263 --- [ main] f.a.AutowiredAnnotationBeanPostProcessor : JSR-330 'javax.inject.Inject' annotation found and supported for autowiring
2016-11-20 16:25:59.606 INFO 14263 --- [ main] trationDelegate$BeanPostProcessorChecker : Bean 'configurationPropertiesRebinderAutoConfiguration' of type [class org.springframework.cloud.autoconfigure.ConfigurationPropertiesRebinderAutoConfiguration$$EnhancerBySpringCGLIB$$fc4b31a3] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
. ____ _ __ _ _
/\\ …Run Code Online (Sandbox Code Playgroud) 我是docker和微服务的新手.我已经开始将我的网络应用程序分解为微服务,目前,我正在进行手动配置.
经过一番研究,我遇到了docker swarm模式,它允许发现服务.此外,我遇到了其他服务发现工具,如Eureka和Consul.
我的主要目标是将curl调用中的IP地址替换为服务名称和同一服务的多个实例之间的负载平衡.
即对于前者 curl http://192.168.0.11:8080/卷曲http:// my-service
我必须保持我的服务语言独立.
请建议,我是否需要使用Consul与docker swarm进行服务发现,或者我可以在没有Consul的情况下进行此操作?有什么好处?
我有一个Spring Boot应用程序也是一个Eureka服务器.我想列出已注册到此Eureka Server的所有实例.我该怎么做?
2017-03-16 16:09:08.821 INFO 9104 --- [ main] com.hello.EurekaClientApplication : No active profile set, falling back to default profiles: default 2017-03-16 16:09:08.848 INFO 9104 --- [ main] ationConfigEmbeddedWebApplicationContext : Refreshing org.springframework.boot.context.embedded.AnnotationConfigEmbeddedWebApplicationContext@5dcd8c7a: startup date [Thu Mar 16 16:09:08 CDT 2017]; parent: org.springframework.context.annotation.AnnotationConfigApplicationContext@441772e 2017-03-16 16:09:09.873 INFO 9104 --- [ main] o.s.b.f.s.DefaultListableBeanFactory : Overriding bean definition for bean 'hystrixFeature' with a different definition: replacing [Root bean: class [null]; scope=; abstract=false; lazyInit=false; autowireMode=3; dependencyCheck=0; autowireCandidate=true; primary=false; factoryBeanName=org.springframework.cloud.netflix.hystrix.HystrixCircuitBreakerConfiguration$HystrixWebConfiguration; factoryMethodName=hystrixFeature; initMethodName=null; destroyMethodName=(inferred); defined in class path resource …
netflix-eureka ×10
spring-boot ×6
spring-cloud ×4
java ×2
netflix ×2
consul ×1
docker ×1
docker-swarm ×1
http-headers ×1
hystrix ×1
netflix-zuul ×1
php ×1
spring ×1
turbine ×1