microservices

Caching layer for different microservices

怎甘沉沦 提交于 2019-12-11 17:24:02
问题 We have different microservices which makes duplicate calls to internal and external services. We need to cache these calls between services to improve latency. We are thinking of introducing an API gateway whose major aim would be caching the data between services. Some other objectives are - i) Would be calling different micro-services to aggregate their response. ii) Would also be avoiding multiple calls to external services across micro services. iii) Would be taking care of cache miss &

How to expose a service in kubernetes running on Barematel

痞子三分冷 提交于 2019-12-11 17:15:42
问题 Kubernetes Version: 1.10 Running on Barematel No. of masters: 3 We are running our multiple microservices inside a Kubernetes cluster. Currently, we are exposing these services outside of the cluster using NodePort . Each microservice has it's own NodePort so we have to maintain a list with the corresponding microservices. Since we are running on Barematel we don't have features like LodeBalancer while exposing a microservice. Problem: - Since we have multiple masters and workers inside the

Cannot get JWT Token from Zuul Header in Spring Boot Microservice Module

一世执手 提交于 2019-12-11 17:05:18
问题 I have tried to send JWT Token in Zuul Header to another microservice module. Each Time request goes from zuul to another module but. I always get null header in another module. But I obtain token in zuul server from auth server but it never reaches to another module. public class JwtTokenAuthenticationFilter extends OncePerRequestFilter { private final JwtConfig jwtConfig; public JwtTokenAuthenticationFilter(JwtConfig jwtConfig) { this.jwtConfig = jwtConfig; } private static final int FILTER

Trace id is not shown on controller level log (Spring boot, Jaeger configuration)

雨燕双飞 提交于 2019-12-11 16:34:46
问题 Language: Java Framework: Spring boot Tools: Jaeger I have done the following configuration for put whole trace on logs. But at controller level log not shown a trace. when hibernate query executed than after trace is put on logs(on service and repository level logs) application.log 2019-11-08 05:14 INFO [iHub-service,] [http-nio-8080-exec-27] INFO c.s.controller.Controller ...............message............. 2019-11-08 05:14 DEBUG [iHub-service,294d434a24290786:294d434a24290786:0:1 - ] [http

Error creating bean with name 'scopedTarget.oauth2ClientContext': Scope 'session' is not active for the current thread;

别等时光非礼了梦想. 提交于 2019-12-11 15:06:09
问题 First of all I want to say that I googled my problem and apllied the advice but it doesn't help me. My source look like this: @SpringBootApplication @EnableEurekaClient @RibbonClient(name = "say-hello"/*, configuration = RibbonConfig.class*/) @EnableAutoConfiguration @EnableOAuth2Sso public class HelloWorldStarter { public static void main(String[] args) { SpringApplication.run(HelloWorldStarter.class, args); } @Bean public RequestContextListener requestContextListener() { return new

Listening on multiple events

给你一囗甜甜゛ 提交于 2019-12-11 12:45:11
问题 How to deal with correlated events in an Event Driven Architecture? Concretely, what if multiple events must be triggered in order for some action to be performed. For example, I have a microservice that listens to two events foo and bar and only performs an action when both of the events arrive and have the same correlation id. One way would be to keep an internal data structure inside the microservice that does the book keeping and when everything is satisfied an appropriate action is

Is there a way to configure the generate method name for grpc-node client?

风格不统一 提交于 2019-12-11 11:04:12
问题 I am hoping to use a grpc-node client to talk to a microservice built in Go using the go-micro framework. I am running into an issue where go-micro defines method names using periods ( . ) to separate namespaces and method names, whereas grpc-node slashes ( / ). Is there anyway to configure this pattern to have these two processes talk to each other? 回答1: The gRPC over HTTP/2 protocol documentation defines that the path is constructed as follows: Path → ":path" "/" Service-Name "/" {method

Microservices communication JDBC SQL VS REST [closed]

有些话、适合烂在心里 提交于 2019-12-11 08:57:15
问题 Closed . This question is opinion-based. It is not currently accepting answers. Want to improve this question? Update the question so it can be answered with facts and citations by editing this post. Closed 12 months ago . which is the best way between these two approches that allow two microservices to exchange data 1- Via Rest call. 2- Each microsevice expose its related data as a database's view ,so that it can be reached by other microservices using Spring JDBC template or JPA. Notice

Microservices client acknowledgement and Event Sourcing

爱⌒轻易说出口 提交于 2019-12-11 08:41:51
问题 Scenario I am building courier service system using Microservices. I am not sure of few things and here is my Scenario Booking API - This is where customer Place order Payment API - This is where we process the payment against booking Notification API - There service is responsible for sending the notification after everything is completed. The system is using event-driven Architecture. When customer places booking order , i commit local transaction in booking API and publish event. Payment

How to handle network calls in Microservices architecture

丶灬走出姿态 提交于 2019-12-11 07:39:19
问题 We are using Micro services architecture where top services are used for exposing REST API's to end user and backend services does the work of querying database. When we get 1 user request we make ~30k requests to backend service . We are using RxJava for top service so all 30K requests gets executed in parallel. We are using haproxy to distribute the load between backend services. However when we get 3-5 user requests we are getting network connection Exceptions, No Route to Host Exception,