microservices

Sharing custom code between two NodeJS microservices

泄露秘密 提交于 2020-01-04 05:31:09
问题 I am creating web app and micorservice for that app, and both need to have same DB model created with Sequelize. What is approach for handling this task with NodeJS? I am thinking about creating separate module of my DB models and save it in private git and add this private git to my web app and microservice as npm dependency. But I am wondering is it right approach or what is right way to separate shared private module between few microservices, in my case it is DB models? Should I go with

How to build front end for Microservices

纵然是瞬间 提交于 2020-01-03 10:59:08
问题 Let's say I have a dozen microservices. I am wondering where should the front end go. Let's say front end is HTML, Javascript, CSS. One way is to make it a separate service handled by a UI team. So it can form the API gateway where the request from browser comes in first. But this seems against the idea of independent self contained services. browser ------> API Gateway ------> Microservices In this link, they say that Javascript and CSS should be served by microservices. API gateway should

Organization of protobuf files in a microservice architecture

时间秒杀一切 提交于 2020-01-03 08:53:10
问题 In my company, we have a system organized with microservices with a dedicated git repository per service. We would like to introduce gRPC and we were wondering how to share protobuf files and build libs for our various languages. Based on some examples we collected, we decided at the end to go for a single repository with all our protobuf inside, it seems the most common way of doing it and it seems easier to maintain and use. I would like to know if you have some examples on your side ? Do

Organization of protobuf files in a microservice architecture

孤街浪徒 提交于 2020-01-03 08:53:10
问题 In my company, we have a system organized with microservices with a dedicated git repository per service. We would like to introduce gRPC and we were wondering how to share protobuf files and build libs for our various languages. Based on some examples we collected, we decided at the end to go for a single repository with all our protobuf inside, it seems the most common way of doing it and it seems easier to maintain and use. I would like to know if you have some examples on your side ? Do

Microservice can not reach to Config Server on Docker Compose

女生的网名这么多〃 提交于 2020-01-03 02:49:09
问题 I have a Eureka Server, Config Server and Spring-Boot Service. I have created a docker compose file like this: version: '3' services: user-service: container_name: user-service-container image: user-service:latest build: context: ./user-service dockerfile: DockerFile hostname: user-service ports: - "8082:8082" depends_on: - postgresdb - eureka-service - config-server environment: management.context-path : /userservice hostName : user-service EUREKA_HOST: eureka-service EUREKA_PORT: 8761

Scaling database in a microservice architecture

二次信任 提交于 2020-01-02 08:56:52
问题 Lets say we have 5 microservices (μS) and each microservice requires one database with a few tables. Each of these services needs to be able to scale including the database queries. To do that we have a few options that I know of: 1. 1-μS; 1 instance; 1 DB instance Don't scale horizontally, just vertically. 2. 1-μS; N instances; 1 DB instance Every instance of a service gets to read and write to the same database. Simple way to scale if the service processing is the bottleneck. 3. 1-μS; N

Dynamic Scalable and adaptive architecture

混江龙づ霸主 提交于 2020-01-02 07:42:10
问题 I am a PhD student in Cloud Computing, I plan to use the microservices based architecture with consul and zeromq for my research project. I had few questions that I am finding hard to understand. Can someone help me out in sharing their experience. We have microservices based on dockers, We have zeromq and we have consul. Can you mention how we could combine all the three together to have a dynamic adaptive environment? Though I understand as to what zeromq, docker and consul is individually,

Spring cloud Zuul retry when instance is down and forward to other available instance

你。 提交于 2020-01-02 04:01:32
问题 using 'Camden.SR5' for spring-cloud-dependencies, with spring boot '1.5.2.RELEASE'. In my current setup, I have eureka server config server (running on random ports) zuul gateway server and 2 instances of a service (running on random ports) All these instances are successfully register with Eureka. When all the services are running, The load balancing is done properly through zuul without any issues. when an instance is killed, Zuul is still trying to fulfil the request using the same service

Java DTO Object search mechanism?

♀尐吖头ヾ 提交于 2020-01-01 18:25:14
问题 I have produced a DTO object from 2 microservices. Profile and ProfileCredit. I am able to successfully retrieve a populated DTO object with relevant data. However I am further curious is it possible to query or do conditional filter on the generated DTO object? and if so what is the approach to achieve just that? For example using 'swagger' this is what gets returned Is it possible to filter by profileCredit field which is present in the dto but the data is retrieved within separate

Join table between Different Microservices

佐手、 提交于 2020-01-01 08:42:20
问题 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