service-discovery | Service Discovery for Consul | Configuration Management library
kandi X-RAY | service-discovery Summary
kandi X-RAY | service-discovery Summary
Service Discovery for Consul
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
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
Using Netflix Eureka as a Service Discovery on a Java
+ Spring
application and getting a HTTP: 503
.
When the address is fixed on the code the application works fine.
I've tried:
SpringDeveloper - Spring Developer Video
Secure Reactive Microservices - Spring Cloud Gateway from Okta Developers
Spring Cloud Hands On - Hands on Spring from Packt
Since I'm using WebFlux
I need to use a @LoadBalanced
over the WebClient
pom.xml
...ANSWER
Answered 2019-Dec-27 at 03:58It is working for me. Not sure what went wrong in your implementation.
Here is what I tried:
Since I am not sure of your customer-service
project, I created my own with following files:
CustomerServiceApplication
QUESTION
What is the best way to get the current docker container IP address within the container itself using .net core
?
I try to register my container to a Consul
server which is hosted on the Docker host (not as a container) and I need to get the container IP address on startup to make the registration. Because the IP addresses change on any container startup I can't just hard-code it into the appsettings.json
. I followed this tutorial. And when it comes to this section:
ANSWER
Answered 2018-Aug-20 at 12:53Ok, I got it working and it was much easier than I thought.
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