Posts

Showing posts with the label microservices

How to create Spring Cloud Config Client with env specific configuration?

Image
Clash Royale CLAN TAG #URR8PPP How to create Spring Cloud Config Client with env specific configuration? I have facing an issue with Spring Cloud Config Server and Eureka Server Profiling. Let's say I have 3 services with their name ("spring.application.name") as : myapp-svc myapp-spring-cloud-config-svc myapp-spring-eureka-svc I want to deploy each service in 2 regions ( dev and prod ). In Dev region, each service will run on localhost and in prod it will have some different url. 'myapp-spring-cloud-config-svc' in dev region will point to local git repo, while in prod region it will point to remote git repo. I can have 2 configurations: 1) When I start 'myapp-svc' service in local, it should connect to 'myapp-spring-cloud-config-svc' in dev. I can do this by setting spring.cloud.config.uri = <url of config svc in Dev>. But the issue with this set up is that the property needs to be defined in bootstrap.properties. So, If deploy 'm...

API Gateway Design

Image
Clash Royale CLAN TAG #URR8PPP API Gateway Design Api gateway http://microservices.io/patterns/apigateway.html seems to be a good pattern to be adopted in Micro Service architecture(Not internal communication between services). But I have below queries I am unable to understand how API Gateways should be designed itself. We can't have just one api gateway for all services. For example for Uber we have Trip, Cabs, Driver, User, Pricing Micro Services, so how many API Gateways should we design. In https://medium.com/netflix-techblog/optimizing-the-netflix-api-5c9ac715cf19 what does Dynamic Endpoints means. I was thinking like in Uber case,to display user first page we will need cabs and pricing. So we will expose an API in api-gateway some /home and from here asynchronously we will call Pricing and Cabs api will merge and return the response. Is there any batter way to do this? By clicking "Post Your Answer...

In Microservices is it acceptable to have an API returning an Aggregate Root that was replicated?

Image
Clash Royale CLAN TAG #URR8PPP In Microservices is it acceptable to have an API returning an Aggregate Root that was replicated? Imagine we have a microservice M1 with an aggregate root called Player and a microservice M2 with an aggregate root called Classification , now in the M1 we need to do some logic based on some property from Classification , now some steps to do that are: Player Classification Classification Ok, now imagine we have a view to add Players, and in that view is possible to choose the Classification of the new Player from a dropdown list. Now the question: Classification Player Should the dropdown list be populated with the Classifications that were replicated into M1 or from M2? As you can see, by using the data from M1 we would have to expose the Classification from M1 via an API, thus the title of the question. Classification 1 Answer 1 I believe both can be done and one ...

definition of airflow dag for a use case with variable dependencies

Image
Clash Royale CLAN TAG #URR8PPP definition of airflow dag for a use case with variable dependencies I would like to use airflow for the following use-case : Note : each airflow task described here is in fact a simple call to a remote micro-service (grpc call). The design I have in mind so far : My questions : By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Microservices in Docker Container

Image
Clash Royale CLAN TAG #URR8PPP Microservices in Docker Container I am using Spring Cloud for Creating Microservice Architecture. I was using the below feature from the Spring Cloud Now Lets say if I have 100 microservices, then we need 100 servers to maintain each microservices. So I thought of using Kubernetes to solve this issue by deploying each microservices in a separate docker container, so now since Kubernetes takes care of microserivice health check, autoscaling, load-balancing so do I need to again use Ribbon, Eureka and Zuul. Can anyone please help me on this 2 Answers 2 Even when you use Spring Cloud, 100 services do NOT mean 100 servers. In Spring Cloud the packaging unit is Spring Boot application and a single server may host many such Spring Boot applications. If you want, you can containerize the Spring Boot applications and other Spring Cloud infrastructure support components. But t...