microservices

GraphQL and Microservice Architecture

非 Y 不嫁゛ 提交于 2019-12-04 07:19:58
问题 I'm trying to understand where GraphQL is most suitable to use within a Microservice architecture. There is some debate about having only 1 GraphQL schema that works as API Gateway proxying the request to the targeted microservices and coercing their response. Microservices still would use REST / Thrift protocol for communication thought. Another approach is instead to have multiple GraphQL schemas one per microservice. Having a smaller API Gateway server that route the request to the

Micro service security

人走茶凉 提交于 2019-12-04 06:44:52
Over the last few days I've been playing with the micro service pattern and all is going well but security seems to baffle me. So If I may ask a question: How do I handle user authentication on an individual service? At the moment I pass a request to the Gateway API which in turns connects to the service. Question Edited Please See Below Bearing in mind that the individual services should not know about each other. The Gateway is the aggregator as such. Current architecture. A little code to simulate the request: Frontend - Client App public class EntityRepository<T> { private IGateway

Heroku load balancer vs Netflix zuul

感情迁移 提交于 2019-12-04 06:23:09
According to this answer https://stackoverflow.com/a/41811770/2849613 I would like to get a little bit more information about best practices with microservices on Heroku. The question is which approach is better? Install every services as independent app, and use one of them as REST "proxy" (for example Netflix Eureka)? Or Create docker based approach with, for example Netflix Zuul as a load balancer? On my own I see already some pros and cons of both approaches: Pros : better scalability (easy to create new machines for bigger load). Cons : communication between services goes "outside of

Kubernetes: should I use HTTPS to communicate between services

谁都会走 提交于 2019-12-04 03:28:12
Let's say I'm using an GCE ingress to handle traffic from outside the cluster and terminate TLS ( https://example.com/api/items ), from here the request gets routed to one of two services that are only available inside the cluster. So far so good. What if I have to call service B from service A, should I go all the way and use the cluster's external IP/domain and use HTTPS ( https://example.com/api/user/1 ) to call the service or could I use the internal IP of the service and use HTTP ( http://serviceb/api/user/1 )? Do I have to encrypt the data or is it "safe" as long as it isn't leaving the

Microservice vs SOA differs

柔情痞子 提交于 2019-12-04 03:14:54
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 for handling a wide range of functionality and data domains, while a general guideline for a

Join table between Different Microservices

*爱你&永不变心* 提交于 2019-12-04 02:53:09
I am still trying to make sense of micro service architecture. The idea to separate different application (include the database) excites me. But I am still confused if there are two micro-services e.g. Product and User. both product and user own table product and user respectively in their database. According to best practice in micro service, we only can access the database from the service. The problem is, let us suppose we have product table that has user_id column. We want to do search product which also return the name of the user who create the product. This requires join between product

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

心不动则不痛 提交于 2019-12-04 02:21:52
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 orchestrated with docker-compose. And with docker-machine, if that matters) But one service can not interact

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

故事扮演 提交于 2019-12-04 02:17:52
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-eureka-server:null:jar}: The version cannot be empty. (org.apache.maven.plugins:maven-resources-plugin:3

Integration testing Spring Boot based Microservices

北城余情 提交于 2019-12-04 00:35:50
问题 I have read many of the guides about working with Spring Boot and RESTful services, and many of them contain information about running unit tests, most notably "Building an Application with Spring Boot". However, I haven't seen anything that gives an example on how to unit test a Spring Boot application that consumes/depends on other Spring Boot applications, as is common in cloud micro-services architecture. So, for example, we have the following Spring Boot services: ServiceMediator,

com.netflix.discovery.shared.transport.TransportException: Cannot execute request on any known server

∥☆過路亽.° 提交于 2019-12-03 22:33:56
I am very new to the microservices and trying to run the code from link: https://dzone.com/articles/advanced-microservices-security-with-spring-and-oa . When I simply run the code I see the following error comes. What is the issue ? com.netflix.discovery.shared.transport.TransportException: Cannot execute request on any known server at com.netflix.discovery.shared.transport.decorator.RetryableEurekaHttpClient.execute(RetryableEurekaHttpClient.java:111) ~[eureka-client-1.4.12.jar:1.4.12] at com.netflix.discovery.shared.transport.decorator.EurekaHttpClientDecorator.getApplications