microservices

Working With Eureka Clients Programmatically issue - Completed shut down of DiscoveryClient

六眼飞鱼酱① 提交于 2019-12-10 11:35:28
问题 I've createde Eureka server with the replication and now trying to start the client. When I'm trying to start the spring-microservices-eureka-client , I get the below error. Using Spring Boot Version 2.1.1.RELEASE . The same error is coming with the Boot Version 2.0.7.RELEASE and Finchley.SR2 . 2018-12-28 13:52:16.741 INFO 20236 --- [ main] o.s.c.n.e.s.EurekaServiceRegistry : Registering application UNKNOWN with eureka with status UP 2018-12-28 13:52:16.742 INFO 20236 --- [ main] com.netflix

org.springframework.web.client.ResourceAccessException: I/O error on GET request for in Microservices

核能气质少年 提交于 2019-12-10 10:45:11
问题 I am developing microservices code from the link : https://github.com/sivaprasadreddy/spring-boot-microservices-series. In this code base, I was successfully able to start the services like "config-service" , "service-registry" , "shoppingcart-ui" , "zipkin-server" etc, but when I tried to start the "inventory-service" , I got the below error. Error below for reference:- org.springframework.web.client.ResourceAccessException: I/O error on GET request for "http://localhost:8200/v1/secret

How to do 2 phase commit between two micro-services(Spring-boot)?

感情迁移 提交于 2019-12-10 07:49:56
问题 I Have two mico-serives A and B where they connect to seperate database, From Mico-serives A i need to persist(save) objects of both A and B in same transtation how to achive this. I am using Spring micro-servies with netflix-oss.Please give suggestions on best way to do achive 2 phase commit. 回答1: you can not implement traditional transaction system in micro-services in a distributed environment. You should you Event Sourcing + CQRS technique and because they are atomic you will gain

Design choice for a microservice event-driven architecture

混江龙づ霸主 提交于 2019-12-10 06:18:21
问题 Let's suppose we have the following: DDD aggregates A and B, A can reference B. A microservice managing A that exposes the following commands: create A delete A link A to B unlink A from B A microservice managing B that exposes the following commands: create B delete B A successful creation, deletion, link or unlink always results in the emission of a corresponding event by the microservice that performed the action. What is the best way to design an event-driven architecture for these two

Spring-cloud Zuul retry when instance is down

别来无恙 提交于 2019-12-09 22:38:05
问题 Using Spring-cloud Angel.SR6: Here is the configuration of my Spring-boot app with @EnableZuulProxy: server.port=8765 ribbon.ConnectTimeout=500 ribbon.ReadTimeout=5000 ribbon.MaxAutoRetries=1 ribbon.MaxAutoRetriesNextServer=1 ribbon.OkToRetryOnAllOperations=true zuul.routes.service-id.retryable=true I have 2 instances of service-id running on random ports. These instances, as well as the Zuul instance, successfully register with Eureka, and I can access RESTful endpoints on the 2 service-id

Microservice vs SOA differs

老子叫甜甜 提交于 2019-12-09 17:03:06
问题 I was looking for differences b/w SOA and Microservices architecture style and found a good link https://www.infoq.com/articles/boot-microservices It Says: As a successor to "Service Oriented Architecture" (SOA), microservices can be categorized in the same family of "distributed systems", and carry forward many of the same concepts and practices of SOA. Where they differ, however, is in terms of the scope of responsibility given to an individual service. In SOA, a service may be responsible

Asynchronous model in grpc c++

不羁岁月 提交于 2019-12-09 11:13:23
问题 My team is designing a scalable solution with micro-services architecture and planning to use gRPC as the transport communication between layers. And we've decided to use async grpc model. The design that example(greeter_async_server.cc) provides doesn't seem viable if I scale the number of RPC methods, because then I'll have to create a new class for every RPC method, and create their objects in HandleRpcs() like this. Pastebin (Short example code). void HandleRpcs() { new CallDataForRPC1(

How do you set up two microservices that both use https port?

依然范特西╮ 提交于 2019-12-08 21:08:30
I have one microservice that is a Asp.Net Core stateless service. The service runs fine and i can access at https://myazureresource.eastus.cloudapp.azure.com/controller/method . My ServiceManifest.xml is: <Resources> <Endpoints> <Endpoint Protocol="https" Name="EndpointHttps" Type="Input" Port="443" /> </Endpoints> </Resources> And MyService.cs is: protected override IEnumerable<ServiceInstanceListener> CreateServiceInstanceListeners() { return new ServiceInstanceListener[] { new ServiceInstanceListener(serviceContext => new KestrelCommunicationListener(serviceContext, "EndpointHttps", (url,

Should the Auth Server be combined with the User Service in a microservices architecture?

假如想象 提交于 2019-12-08 17:41:37
问题 I am currently building a microservices based application in spring boot with the following services Auth server (Distributes access tokens) User service (User info like username, password, email, etc.) Various other unrelated services When a user sends their credentials to the auth server, the auth server should verify that they are correct and then return an access token. My question is, should I combine the auth server with the user service so looking up credentials is a simple database

Microservice can not reach to Config Server on Docker Compose

只谈情不闲聊 提交于 2019-12-08 16:17:38
I have a Eureka Server, Config Server and Spring-Boot Service. I have created a docker compose file like this: version: '3' services: user-service: container_name: user-service-container image: user-service:latest build: context: ./user-service dockerfile: DockerFile hostname: user-service ports: - "8082:8082" depends_on: - postgresdb - eureka-service - config-server environment: management.context-path : /userservice hostName : user-service EUREKA_HOST: eureka-service EUREKA_PORT: 8761 config-server: container_name: config-server-container image: config-server:latest build: context: ./config