microservices

Micro-services architecture loose coupling complications

无人久伴 提交于 2019-12-28 07:03:10
问题 I'm fairly new to the whole micro-services bandwagon. I have been doing some research into the architecture and principles behind a good micro-services environment. One of the main things that defines a micro-service is supposed to be the loosely coupled nature of each service. Micro Service A should never call Micro Service B directly, or you're effectively creating a monolithic system that looses the scalability offered by the architecture pattern. Question / example If I develop a micro

When utilizing a microservices architecture, will the underlying read/write database become a bottleneck?

独自空忆成欢 提交于 2019-12-25 12:58:58
问题 As I described in the question, if I were to implement a microservices architecture, would the centralized read/write database become a bottleneck? To expand with an example, let's say I have three microservices: users , teams , and team_members . Each has its own microservice, but they all rely on each other in the database, so exclusive, parallel databases wouldn't be appropriate. Since microservices is meant to distribute the work to several different servers, doesn't the central database

microservices and bounded contexts

扶醉桌前 提交于 2019-12-25 07:25:01
问题 For the sake of question, let's say i have 2 microservices. Identity management Accounting I know that each microservice should not be tightly coupled and it should have it's own database. Let's say that accounting has invoices and each invoice has issuing agent. Agent from accounting also exists as User in Identity microservice. If i understood well, data from identity management (users), should be copied to accounting (agents), and should copy only data which are needed for that bounded

JWT/KONG: Cannot create JWTs with a shared secret

独自空忆成欢 提交于 2019-12-25 05:19:34
问题 I'm playing around KONG API gateway recently. I want to sign each JWT with a secret that is shared in all micros. I need this because I want other micros to be able to decode given JWT and extract payload data and work upon it (e.g. _user_id_ field in the payload). When I try to create a JWT for the first consumer, it works just fine. But when I try to create it for the second consumer I'm getting the following error: {u'secret': u"already exists with value 'secret'} I'm not exactly sure but

Why does each microservice get its own database?

不羁岁月 提交于 2019-12-25 03:12:02
问题 It seems that in the traditional microservice architecture, each service gets its own database with a different understanding of the data (described here). Sometimes it is considered permissible for databases to duplicate data. For instance, the "Users" service might know essentially everything about a user, whereas the "Posts" service might just store primary keys and usernames (so that the author of a post can have their name displayed, for instance). This page talks about eventual

How to make a method from an abstract super class perform always the same first line of code in python?

久未见 提交于 2019-12-25 00:09:22
问题 I've implemented an abstract class BaseMicroservice with the following methods: @abstractmethod def handle(self, message): pass def init_producer(self): self.producer = KafkaProducer(bootstrap_servers=self.config.get('kafka').get('bootstrap_servers'), value_serializer=lambda m: json.dumps(m).encode('utf-8')) self.is_prod_init = True whenever handle is called in one of the sub classes that implement this method, I want the first thing to be done to be init_producer. What's the best way to

Can't get config files when run ConfigServer and EurekaServer on docker container

北慕城南 提交于 2019-12-24 20:00:27
问题 [Spring boot Microservies] I have a microservices includes 2 services: ConfigService and DiscoveryService ConfigService is enabled ConfigServer, keep files config for microservice DiscoveryService is EurekaServer. It will get config file from ConfigService When run 2 service on local (not docker), everything is good Fetching config from server at: http://localhost:8088 Located environment: name=epl-discovery-service, profiles=[default], label=null, version

Audit Logging in Spring Microservices

为君一笑 提交于 2019-12-24 17:05:09
问题 We are developing Micrsoservices application using Spring & Hibernate . We have implemented hibernate-envers for data auditing and our database is PostgreSQL. We would like to have log auditing in a separate microservice. How to enable audit-logging in Microservices Spring App? 来源: https://stackoverflow.com/questions/51473064/audit-logging-in-spring-microservices

How to capture log on each instance of the microservice through zuul

耗尽温柔 提交于 2019-12-24 11:13:04
问题 I have setup multiple instances of my microservice and registered to my eureka server. It uses ribbon for client side load balancing and uses zuul as gateway server. All usual stuff. I would like to capture the logs of which instance of my service is responding for each request. So that I can able to bring some conclusion based on my usage of each instances. How to do that? 回答1: You can try to set the loglevel just of the LoadBalancerContext to debug in application.properties #logging logging

Does my default app have to be deployed to appspot.com?

戏子无情 提交于 2019-12-24 10:46:03
问题 I asked a question about the default app as it related to microservices on app engine and got a great response here, but I have another question relating to this. Does my default app have to be accessible via appspot.com? when i run the deploy command thats where it puts it, but I'd rather have it not accessible like that. I really just want a semi-empty (like hello world sized) app that satisfies the default app requirement. It does seem like google is shoehorning multi-app/microservices