microservices

Can (or should) 2 docker containers interact with each other via localhost?

若如初见. 提交于 2019-12-21 08:24:03
问题 We're dockerizing our micro services app, and I ran into some discovery issues. The app is configured as follows: When the a service is started in 'non-local' mode, it uses Consul as its Discovery registry. When a service is started in 'local' mode, it automatically binds an address per service (For example, tcp://localhost:61001, tcp://localhost:61002 and so on. Hard coded addresses) After dockerizing the app (for local mode only, for now) each service is a container (Docker images

Can (or should) 2 docker containers interact with each other via localhost?

自作多情 提交于 2019-12-21 08:23:54
问题 We're dockerizing our micro services app, and I ran into some discovery issues. The app is configured as follows: When the a service is started in 'non-local' mode, it uses Consul as its Discovery registry. When a service is started in 'local' mode, it automatically binds an address per service (For example, tcp://localhost:61001, tcp://localhost:61002 and so on. Hard coded addresses) After dockerizing the app (for local mode only, for now) each service is a container (Docker images

Project build error: 'dependencies.dependency.version' for org.springframework.cloud:spring-cloud-starter-eureka-server:jar is missing

|▌冷眼眸甩不掉的悲伤 提交于 2019-12-21 08:18:09
问题 I am developing a code from https://www.dineshonjava.com/microservices-with-spring-boot/. When I update the spring-boot-starter-parent from 1.5.4.RELEASE to 2.0.4.RELEASE , build got failed. Could anyone please guide me what is the issue ? Project build error: 'dependencies.dependency.version' for org.springframework.cloud:spring-cloud-starter-eureka-server:jar is missing. Another error: Multiple annotations found at this line: - For artifact {org.springframework.cloud:spring-cloud-starter

Spring boot Kubernetes Service Discovery

早过忘川 提交于 2019-12-21 06:16:21
问题 I am running into issues with Kubernetes Service Discovery on Spring Boot applications. I should be able to discover the services whether my spring boot application is running within or out of Kubernetes cluster. Our local development won't be on k8s cluster. I am using Service Discovery via DNS. I tried using spring-cloud-starter-kubernetes <dependency> <groupId>org.springframework.cloud</groupId> <artifactId>spring-cloud-starter-kubernetes</artifactId> <version>0.2.0.RELEASE</version> <

Service discovery on aws ECS with Application Load Balancer

本秂侑毒 提交于 2019-12-21 04:38:35
问题 I would like to ask you if you have an microservice architecture (based on Spring Boot) involving Amazon Elastic Container Service (ECS) with Application Load Balancer(ALB), service discovery is performed automatically by the platform, or do you need a special mechanism (such as Eureka or Consul)? From the documentation (ECS and ALB) is not clear you have this feature provided. 回答1: I have talked this with the Amazon support team and they respond the following: "...using Service Discovery on

Microservice to Microservice calls, authorization from a queue message

烈酒焚心 提交于 2019-12-20 19:05:57
问题 Context: I'm creating a cloud platform to support multiple applications with SSO. I'm using Keycloak for authentication and Netflix Zuul for authorization (API Gateway) thru Keycloak Spring Security Adapter . Each microservice expect an Authorization header, which contains a valid JWT, from which it will take the username (sub) to process the request. Each microservice-to-microservice call should go thru Netflix Zuul first, passing the Authorization header to maintain a stateless validation.

How to implement contract testing when kafka is involved in microservice architecture?

安稳与你 提交于 2019-12-20 18:30:23
问题 I am currently working on a project where we have kafka implementation in micro service architecture. Were you successful in creating contract test cases for mS to kafka topic interaction please using pact-jvm ? My implementation is microservice1 publishes a message to a REST Client which in turn posts the message to Kafka Topic. microservice2 uses GET method to retrieve messages from the Kafka Topic. 回答1: Pact-JVM supports Message Pacts, which encapsulate a message that is consumed (one way)

Authorisation in microservices - how to approach domain object or entity level access control using ACL?

女生的网名这么多〃 提交于 2019-12-20 12:28:09
问题 I am currently building microservices based system on java Spring Cloud. Some microservices use PostgreSQL and some of them MongoDB. REST and JMS is used for communication. The plan is to use SSO and OAuth2 for authentication The challenge I am facing is that authorisation have to be done on domain object/entity level. It means some kind of ACL (Access Control List) is needed. The best practice for this kind of architecture is to avoid something like this and have coarse grained security

Entity-level access restriction in the microservice architecture based on user or group membership

余生颓废 提交于 2019-12-20 10:57:18
问题 In the systems, there may be data that is restricted in nature. Sometimes access to specific entities should be easily restricted or granted based on user or group membership. What is the best way to implement this in the microservice architecture? #1 Should access control, managing permissions etc. be the responsibility of the microserive itself? Developers will have to implement access control, store, and update permissions for every service. Seems like not very robust and error-prone

AWS Load Balancer 502

≯℡__Kan透↙ 提交于 2019-12-20 09:53:34
问题 I have microservices(in different programming languages) running on an EC2 instance. On production I notice a few 502 Bad Gateway Errors when these services try to interact with each other. Also in the logs of the requested service it doesn't show any api call is being hit example service A calls service B, but in service B logs there is nothing to indicate that a call came from service A. Can it be AWS load balancer issue? Any help would be appreciated. Thanks in advance. Solution tried: We