microservices

Relational DB in microservices

被刻印的时光 ゝ 提交于 2021-02-10 15:05:13
问题 I have a monolithic application that currently uses a PostgreSQL DB and the schemas are set up as you would expect for most relational databases with various table data being linked back to the user via FKs on the user_id . I'm trying to learn more about microservices am trying to migrate my python API to a microservice architecture. I have a reasonable understanding of how I'm going to break up the larger app into smaller parts, however, I'm not entirely clear on how I'm supposed to deal

How to implement external auth in KONG?

微笑、不失礼 提交于 2021-02-10 14:14:46
问题 I'm using KONG API Gateway, and I want to implement JWT authentication as separate microservice (not using KONG plugin), now I can easily register this service with KONG, and so users can register and login. Assume an authenticated user had sent a request with a token attached in the header, how to make KONG forwards the request to the authentication service first, then if it is valid the request is forwarded to the requested service? 回答1: Yes you can (But I have not used them) there is as

Can we use Web-Sockets for Communication between Microservices?

穿精又带淫゛_ 提交于 2021-02-10 12:33:06
问题 We have a use case where we have two microservices, Microservice A pushes a long-running task to Microservice B . Microservice B starts processing the task and keeps updating the status of the task. Now Microservice A has to constantly poll Microservice B for an update on the status of the task. We don't have queues in our current setup. So, We thought of creating a web socket between Microservice A and Microservice B so that Microservice B can push the status updates to Microservice A .

How to configure multiple services/containers in Kubernetes?

跟風遠走 提交于 2021-02-08 06:09:39
问题 I am new to Docker and Kubernetes. Technologies used: Dotnet Core 2.2 Asp.NET Core WebAPI 2.2 Docker for windows(Edge) with Kubernetes support enabled Code I am having two services hosted into two docker containers container1 and container2. Below is my deploy.yaml apiVersion: extensions/v1beta1 kind: Deployment metadata: name: webapi-dockerkube spec: replicas: 1 template: metadata: labels: app: webapi-dockerkube spec: containers: - name: webapi-dockerkube image: "webapidocker:latest"

Is it bad idea to share (almost) identical data among microservices for item recomendation purposes

那年仲夏 提交于 2021-02-08 05:49:12
问题 I have a question about the architecture of application composed of microservices. I have few microservices, but those that are interesting in the context of this question are: Human Resources - here are stored all the user data such as username, sex, user's experience etc. Jobs - here are stored all the data about each job advertisement - job description, expected experience etc. So, I need to create new microservice (let's name it Recommender ) which sole purpose will be - based on the

Api gateway for Microservices with Google Cloud Functions

亡梦爱人 提交于 2021-02-08 03:42:25
问题 Inputs For example, we have a few services. Account service Product service Payment service Each service is a separate Google Cloud Function. Each service has its own HTTP API. For example, the account service has: https://REGION-FUNCTIONS_PROJECT_ID.cloudfunctions.net/account/sign-up https://REGION-FUNCTIONS_PROJECT_ID.cloudfunctions.net/account/sign-in https://REGION-FUNCTIONS_PROJECT_ID.cloudfunctions.net/account/reset-password etc Each service has its own swagger documentation endpoint

Client authentication in microservices using JWT and OpenID Connect

故事扮演 提交于 2021-02-08 02:37:39
问题 I've some questions regarding authentication in a microservices architecture. I've right now a monolithic application and my goal is to split the application in small microservices. My bigest problem is for authentication (for now). After reading a LOT a documentation, It seems that the best solution is to use OpenID Connect to authenticate an user to retrieve a JWT that can by passed with the request to the microservices. Also, to avoid having multiple endpoints, you can deploy and API

Microservice solution structure in .NET applications

百般思念 提交于 2021-02-07 13:19:31
问题 I'm developing an application using the microservices approach, and I'm having a hard time defining how those microservices will look like on a visual studio project. My initial approach is to create one visual studio solution for every microservice. Every solution will have the following projects: Host Business API Data Access Layer Model Interfaces (for DI) Data Access Mock Tests for Business API So there are 7 projects per microservice. Somehow it feels a lot of projects being

Aggregation of data on API Gateway

ε祈祈猫儿з 提交于 2021-02-07 12:35:14
问题 I am working on microservice architecture and I want to aggregate data from two microservices. For example, Frontend calls the API Gateway and API Gateway calls two microservices Customer and Order microservices. Customer microservice returns customer details and Order microservice returns all ordered products by customer. This is the format returned by API Gateway after aggregation from two microservice using Ocelot or Azure API Management. Format 1 { "Customers":[ { "customerId":1001,

Exchange reference token for JWT - downstream microservices authorization

好久不见. 提交于 2021-02-07 09:20:55
问题 I am currently creating a new application based on a Microservices architecture, with authentication provided by Identity Server 4. Following lots of research and also setting up proof of concepts, I have Identity Server setup to secure the API's and a native application successfully accessing these services using tokens. Initially the client was issued an access token which was used to access the API's, I have however now switched this out to use reference tokens. Now, onto the issue! The