microservices

Keeping services in sync in a kafka event driven backbone

断了今生、忘了曾经 提交于 2020-06-17 02:31:11
问题 Say I am using Kafka as the event-driven backbone for all my microservices in my system design. Many microservices use the events data to populate their internal databases. Now there is a requirement where I need to create a new service and it uses some events data. The service will only be able to consume events after the time it comes live and hence, won't have a lot of data that it missed. I want a strategy such that I don't have to backfill my internal databases by writing out scripts.

Keeping services in sync in a kafka event driven backbone

社会主义新天地 提交于 2020-06-17 02:30:08
问题 Say I am using Kafka as the event-driven backbone for all my microservices in my system design. Many microservices use the events data to populate their internal databases. Now there is a requirement where I need to create a new service and it uses some events data. The service will only be able to consume events after the time it comes live and hence, won't have a lot of data that it missed. I want a strategy such that I don't have to backfill my internal databases by writing out scripts.

How to Maintain Proto Files?

做~自己de王妃 提交于 2020-06-16 04:23:53
问题 I've created 3 proto files and would like to keep it in a git repo: separated from all others files. The repository contains only .proto files . I have 3 microservices and each of them has their own repository that is using those proto files to communicate with each others: You can see on the picture above, that proto files are consuming from different microservices. Assume, I am going to change the Protofile2 and push the changes to proto repository, remember proto files repository are

Docker-compose make 2 microservices (frontend+backend) communicate to each other with http requests

断了今生、忘了曾经 提交于 2020-06-08 13:15:06
问题 I have 2 microservices: frontend with next.js and a backend with node.js from where I fetch data via REST-APIs from the frontend. I now have the problem, that my 2 services don't seem to communicate directly to eachother, the thing is, it works when I fetch the data at the beginnning with the getinitialProps() Method with the fetch-API. My server-side frontend finds the backend via its service-name. However, when I am doing a http-request from the client to the backend (e.g via browser form

How do I create boundaries for my microservices?

余生颓废 提交于 2020-06-01 05:13:51
问题 We have a monolithic web based CRUD application (call it A ) which does a certain task. Now, we have a new requirement which is more or less independent of A functionally. The audience is different, the times of use, the functionality etc. are all different. Because of this, we decided to build this into a new service B . The problem started when B required authentication information from A . Anticipating that this might happen again, we pulled out the auth from A and put it as separate

How to persist OAuth2AuthorizedClient in redis-session

牧云@^-^@ 提交于 2020-05-31 04:05:50
问题 My project uses redis session with springboot session and spring security 5.1.10 . I just migrated the old oauth2 implementation. Before, when I restarted the app I still had the access_token and refresh_token. With this implementation the user is logged in, but I loose the AuthorizedClients so loadAuthorizedClient function returns null after restarting. Also in production we have many containers with the same app. Is there any springboot stardard way to achieve this? like register some bean

How to persist OAuth2AuthorizedClient in redis-session

二次信任 提交于 2020-05-31 04:05:41
问题 My project uses redis session with springboot session and spring security 5.1.10 . I just migrated the old oauth2 implementation. Before, when I restarted the app I still had the access_token and refresh_token. With this implementation the user is logged in, but I loose the AuthorizedClients so loadAuthorizedClient function returns null after restarting. Also in production we have many containers with the same app. Is there any springboot stardard way to achieve this? like register some bean

Refused connection to RabbitMQ when using docker link

南楼画角 提交于 2020-05-29 07:26:07
问题 I have a microservices application which has two services and a rabbit mq used as a message queue for communication between them. Now, I want to deploy them on docker. I have the following code in the docker-compose.yml file: version: "3" services: rabbitmq: build: ./Rabbit hostname: "rabbitmq" container_name: "rabbitmq" environment: RABBITMQ_ERLANG_COOKIE: "cookie" RABBITMQ_DEFAULT_USER: "user" RABBITMQ_DEFAULT_PASS: "pass" RABBITMQ_DEFAULT_VHOST: "/" ports: - "15672:15672" - "5672:5672" #

Authentication between microservices: Amazon API Gateway

倾然丶 夕夏残阳落幕 提交于 2020-05-28 06:41:53
问题 I have several microservices(Springboot) which I have hosted on AWS. For example Lets assume Service1 and Service2 are two micro services. Service1 is the microservice which is accessed by frontend and mobile app. Service1 calls Service2. Service2 is completely internal. I have setup Amazon API Gateway which sits infront of Service1. And I have Authentication(Oauth) configured using cognito. All this is working. When calling from frontend/app, the request needs to be authenticated with the

Kubernetes Cross Namespace Ingress Network

为君一笑 提交于 2020-05-25 05:11:50
问题 I have a simple ingress network, I want to access services at different namespaces, from this ingress network. How I can do this? My ingress network yaml file: apiVersion: extensions/v1beta1 kind: Ingress metadata: name: ingress spec: rules: - host: api.myhost.com http: paths: - backend: serviceName: bookapi-2 servicePort: 8080 path: /booking-service/ I've set the ExternalNames service type to the yaml file: apiVersion: v1 kind: Service metadata: name: bookapi-2 namespace: booking-namespace