microservices

Database “C:/data/sample” not found, and IFEXISTS=true, so we cant auto-create it - Error in Spring Boot

时间秒杀一切 提交于 2020-05-23 10:15:24
问题 I have created a spring boot application to connect h2 database with it. While doing so, it throws an error showing Database not found. Please help me with the solution which I can implement and resolve the issue. I have added com.h2database dependency in the pom.xml file, then also it gives the error. Below is my pom.xml file and application.properties file pom.xml <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation=

In kong api gateway, how to make custom url?

一世执手 提交于 2020-05-17 07:12:08
问题 So I am creating application using microservice architecture. I have few microservices and I want to configure all in kong with custom routes/url. For example: I have user service and location service and I want those routes in kong looks like this: GET http://localhost:8001/service/user/list --> http://user-service-url.com/user_list GET http://localhost:8001/service/location/122332--> http://location-service-url.com/get/122332 I have searched all over the internet and couldn't find anything.

Specifying route URI in Spring Cloud Gateway Configuration

自古美人都是妖i 提交于 2020-05-14 02:48:31
问题 Here is the yml for spring cloud gateway. I want to write URI without load balancing. But as I'm using Eureka, I don't think hardcoding something like "localhost:6678" is a good idea. I would like to specify the service name, without the lb prefix. Any way to write it ? spring: cloud: gateway: routes: - id: before_route uri: lb://hello-service I'm seeing this on the console when I run the gateway: You already have RibbonLoadBalancerClient on your classpath. It will be used by default. As

Specifying route URI in Spring Cloud Gateway Configuration

╄→尐↘猪︶ㄣ 提交于 2020-05-14 02:44:48
问题 Here is the yml for spring cloud gateway. I want to write URI without load balancing. But as I'm using Eureka, I don't think hardcoding something like "localhost:6678" is a good idea. I would like to specify the service name, without the lb prefix. Any way to write it ? spring: cloud: gateway: routes: - id: before_route uri: lb://hello-service I'm seeing this on the console when I run the gateway: You already have RibbonLoadBalancerClient on your classpath. It will be used by default. As

How to handle HTTP requests in a Microservice / Event Driven Architecture?

喜夏-厌秋 提交于 2020-05-09 17:50:05
问题 Background: I am building an application and the proposed architecture is Event/Message Driven on a microservice architecture. The monolithic way of doing thing is that I've a User/HTTP request and that actions some commands that have a direct synchronous response . Thus, to respond to the same User/HTTP request is 'hassle free'. The problem: The user sends an HTTP request to the UI Service (there are multiple UI Services) that fires some events to a queue (Kafka/RabbitMQ/any). a N of

GCLOUD Kubernetes in f1-micro results in (Node pools of f1-micro machines are not supported due to insufficient memory)

╄→尐↘猪︶ㄣ 提交于 2020-04-30 06:25:42
问题 I tried to start a new f1-micro node in my cluster using Googles UI and it silently fails. So I decided to run it using gcloud to see if that one provides more details And so I ran the following gcloud container node-pools create my-f1-pool --image-type ubuntu --machine-type=f1-micro --cluster bcomm-sg-cluster --disk-size=10GB --enable-autoscaling --min-nodes=2 --max-nodes=6 --zone=asia-southeast1-a --enable-autorepair This is the result I got instead WARNING: Modifications on the boot disks

Response redirect to other domain with a cookie in golang

烈酒焚心 提交于 2020-04-18 05:48:29
问题 I try to set a cookie in one domain and send it to another domain. Architecture : API-Gateway -> User service When a login request receives to Gateway, it forwards it to User service. User service does credential checking, if it matches, then redirect it to gateway. expiration := time.Now().Add(24 * time.Hour) cookie := http.Cookie{Name: "usercookie",Value:jwtToken,Expires:expiration,Path:"/"} http.SetCookie(res, &cookie) redirectURL := "http://localhost:7070/home?usercookie=" + url

Which HTTP errors should never trigger an automatic retry?

扶醉桌前 提交于 2020-04-07 18:41:10
问题 I'm trying to make a few microservices more resilient and retrying certain types of HTTP requests would help with that. Retrying timeouts will give clients a terribly slow experience, so I don't intend to retry in this case. Retrying 400s doesn't help because a bad request will remain a bad request a few milliseconds later. I imagine there are other reasons to not retry a few other types of errors, but which errors and why? 回答1: There are some errors that should not be retried because they

Which HTTP errors should never trigger an automatic retry?

萝らか妹 提交于 2020-04-07 18:40:47
问题 I'm trying to make a few microservices more resilient and retrying certain types of HTTP requests would help with that. Retrying timeouts will give clients a terribly slow experience, so I don't intend to retry in this case. Retrying 400s doesn't help because a bad request will remain a bad request a few milliseconds later. I imagine there are other reasons to not retry a few other types of errors, but which errors and why? 回答1: There are some errors that should not be retried because they

Microservices Architecture: Cross Service data sharing

风格不统一 提交于 2020-04-07 10:55:28
问题 Consider the following micro services for an online store project: Users Service keeps account data about the store's users (including first name, last name, email address, etc') Purchase Service keeps track of details about user's purchases. Each service provides a UI for viewing and managing it's relevant entities. The Purchase Service index page lists purchases. Each purchase item should have the following fields: id, full name of purchasing user, purchased item title and price.