service-discovery | Simple service discovery implementation using Nx | Microservice library
kandi X-RAY | service-discovery Summary
kandi X-RAY | service-discovery Summary
This article intention is to give you a broader perspective into the Microservices architecture. There's many people out there claiming they have a Microservice oriented architecture but they lack of the core concepts on which this pattern relies. My goal is to write a set of articles looking to clear all the fog that appears when shifting from monolithic to highly distributed application. The Microservices world is full of interesting and incredibly hard to implement stuff. When you get started you think that by just dividing your app in multiple services you are already there. Sadly, that's almost never true. It's more common than you think to see people building highly critical apps in this way without having in place all the core concepts. In this article I'm going to focus in two patterns API Gateway and Service Discovery. If you are doing Microservice architecture you SHOULD know these two pretty well, being that the case use this article to make sure you have clear knowledge on these concepts. If you are enterily new to Microservices, have fun and enjoy the ride. In traditional monolithic applications, API clients consume everything from the same location. Although, once you start using microservices things start to change, you may have multiple services running on entirely different locations. Typically those locations aren't static so that has to be taken into account.
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of service-discovery
service-discovery Key Features
service-discovery Examples and Code Snippets
Community Discussions
Trending Discussions on service-discovery
QUESTION
I am using Consul as SD and while I am running multiple instances I want make gateway recognize them all to load balance. In case of hardcoded host for Krakend config everything works fine
I was going step by step with this: https://www.krakend.io/docs/backends/service-discovery/
Sending
dig @127.0.0.1 -p 8600 user-ms.service.consul SRV gives me response as well (on consul logs a also see that I've made a request)
But when I am making request via krakenD I am getting "no hosts available" and according to logs request wasn't send to consul
Here is a docker-compose file:
...ANSWER
Answered 2022-Mar-23 at 16:12when I am making request via krakenD I am getting "no hosts available" and according to logs request wasn't send to consul
The reason your request is failing is because Consul's DNS server listens on the non-standard port of 8600. Kraken does not appear to support configuring a custom DNS IP and non-standard port. It uses the underlying host's configured nameservers in /etc/resolv.conf
resolve SRV requests, and expects these IPs to be reachable over port 53.
The following is a Docker compose file that includes the following changes to allow Kraken to resolve DNS against Consul.
QUESTION
I have an error message as so when trying to convert an existing app to use react-router v6:
Error: A
is only ever to be used as the child of
element, never rendered directly. Please wrap your
in a
.
here is my App
component (BrowserRouter
wraps the app, custom Router
component is a child):
ANSWER
Answered 2021-Nov-29 at 17:39The overall structure of Routes
component to Route
components is correct, but the routed components should be rendered as JSX, not a reference to a React component, on the element
prop.
QUESTION
Summary:
I want to make NGINX (not NGINX Plus) re-resolve the IP address from the DNS name by using a variable in proxy_pass
(as suggested in this official Nginx article in the section "Setting the Domain Name in a Variable"). But when I do that it won't set/forward the correct Content-Type
header, but always use text/html
, for .css
, .js
etc. files.
My setup:
I have a frontend and a backend service running in separate Docker containers (to be deployed to OpenShift in production). There's also a third container that runs nginx:latest
(v1.19.9 as of today) and acts as a reverse proxy, forwarding calls made to /my-app
to the frontend and /my-app/api
to the backend container. The NGINX reverse proxy has set them up as upstream servers using their DNS names.
All three containers run within the same custom Docker network, so resolving in itself works fine - but only, when NGINX is (re-)started.
The problem:
When the frontend or backend container gets restarted it may get a new IP address. Since NGINX caches IP addresses I'm getting a 502
when I make calls to them. I want NGINX to re-resolve the IP address more frequently, like NGINX Plus does. This is how the problem with the Content-Type
came up, when I tried to have NGINX re-resolve DNS names.
The configuration:
Here's my NGINX configuration (simplified to the relevant stuff only):
ANSWER
Answered 2021-May-24 at 16:12This isn't a problem with Content-Type
. You are using proxy_pass
incorrectly. As you have already noted:
When using variables in proxy_pass, if URI is specified, it is passed to the server as is, replacing the original request URI.
You currently have the following working configuration, but you want to replace it with a variable to force DNS resolution:
QUESTION
We use CDK and we are starting using service discovery within our ECS services (hence, server to server not client to server). This means that we don't need ALB (for the moment at least, maybe we can revisit this choice later).
Unfortunately the CDK pattern that exists for building ECS services (ecs_patterns.ApplicationLoadBalancedFargateService
) also creates an ALB, so we cannot use it as it is and we need to create those CDK steps ourselves.
The idea is basically to "port" this tutorial from AWS from using AWS CLI to use CDK.
Question is: has anyone done that already and wants to share it or knows the reason why CDK Patterns doesn't have that option?
(If nobody is going to share it, we will do it and then share it of course; I think this option should be present in CDK straight away and it's just a matter of not wasting time with "just" a configuration issue – unless there is something we are not seeing here...).
...ANSWER
Answered 2021-Mar-26 at 21:17CDK Patterns is a great resource, however it is limited to only a subset of all of the possible use cases for deploying infrastructure on AWS, hence 'patterns'.
I have no personal experience with AWS Service Discovery but it appears the CDK does offer L2 constructs for it. aws-servicediscovery
In addition to service discovery, you can also create a L2 FargateService construct using the aws-ecs library.
QUESTION
I am trying to use a variable from with_item to create a fact whose name changes:
...ANSWER
Answered 2020-Nov-04 at 23:07So it turn out to be actually quite simple:
QUESTION
I'm reverse proxying an AWS API Gateway stage using nginx. This is pretty straightforward:
...ANSWER
Answered 2020-Oct-13 at 12:19You have the URI /production
embedded in the variable, so the :443
is tagged on to the end of the URI rather than the host name. I'm not convinced you need the :443
, being the default port for https
.
Also, when variables are used in proxy_pass and a URI is specified in the directive, it is passed to the server as is, replacing the original request URI. See this document for details.
You should use rewrite...break
to change the URI and remove any optional URI from the proxy_pass
statement.
For example:
QUESTION
My goal is this:
- A single public DNS record for my entire cluster
- A single ingress for my entire cluster
- I don't want to have to update the ingress for new deployments/services- it has a way of automatically routing to them
I'm using gke: https://cloud.google.com/kubernetes-engine/docs/concepts/service-discovery
So by default a service gets an internal DNS record like my-svc.my-namespace.svc.my-zone
What I want is to be able to hit that service like this: http://myapps.com/my-svc.my-namespace.svc.my-zone/someEndpoint
Is this possible? It would mean I could deploy new deployments and services and they would be immediately be accessible to consumers outside the cluster.
Do you have to associate an ingress with a backend service? I don't want to do that because it means I'll need to update it to add every new deployment/service and I want to make it dynamic. Can you have an ingress use internal DNS for routing to services?
...ANSWER
Answered 2020-Oct-09 at 22:15I think there are several ways to accomplish this. One way would be to not use the Ingress resources at all and instead, put an Nginx proxy in front of your services. Then configure it to proxy all requests. A configuration like this should work.
QUESTION
I have a microservice arhitecture and each microservice has it's own mysql database. The application works fine in an IDE but i have problems deploying it because I can't bind my mysql db to game microservice. I'm getting Communication link failure. Stack trace is below.
docker-compose.yml
...ANSWER
Answered 2020-May-18 at 12:21After researching this issue for a full week of pain I have unexpectedly solved this. I've added this 3 lines of code in game's environment (docker-compose).
QUESTION
Below is the build.gradle
file:
ANSWER
Answered 2020-Mar-20 at 16:48https://docs.gradle.org/current/userguide/more_about_tasks.html shows examples of how to define custom tasks.
Here is how you can define your tasks the verbose way.
QUESTION
I have 2 applications, both written using spring boot. Both are running in different docker containers. I also have consul running in a different docker container. I have exposed port 8500 for consul using docker-compose.yml file. So, how do I specify to my spring boot applications where to register themselves, i.e, where is consul running. Do I give the address of the mapped port (port mapped to my local machine), or some other change?
The example I'm using right now: https://github.com/Java-Techie-jt/cloud-consul-service-discovery
Edit:
docker-compose.yml:
...ANSWER
Answered 2020-Feb-03 at 07:43You can use registrator for your service registry.
Registrator automatically registers and deregisters services for any Docker container by inspecting containers as they come online. Registrator supports pluggable service registries, which currently includes Consul, etcd and SkyDNS 2.
You can run registrator as a container.It will register each port of your application. Below is the sample compose file :-
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install service-discovery
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page