Comments (2)
Unfortunately, the documentation about discovery is not ready yet.
In short, there are two ways we support for calling Consul.
The first one is using Consul Queries - it executes a Consul query which its name is a combination of the service name and environment (for example: "GpuService-dev").
It is using the following api: {ConsulAddress}/v1/query/{ServiceName-env}/execute?dc={DataCenter}
It calls it every second (by default), to follow up changes.
This way is the default one, but it is going to be deprecated in the future.
The second way is making use of two Consul apis: key-value and health.
It first searches for this service at key-value store, calling this api:
{ConsulAddress}/v1/kv/service?dc={DataCenter}&keys
searching for a key named "service/{ServiceName-env}"
Then it calls this api:
{ConsulAddress}/v1/health/service/{ServiceName-env}?dc={DataCenter}&passing
In the service's tags, it searches for a tag starting with "version:", which states what is the current service version (The service may be deployed on more than one node, and it may contain different version on different nodes). Only nodes which have a version tag with the relevant version will be returned.
The call to these apis on done by long-polling, so it gets notification when changes occured, with no need to call it every second in order to follow up changes.
This way is better for performance issues, although it is more complicated for implementation.
You can configure how to use Consul by defining the following configuration entry: Consul.LongPolling
Its default value is "false", which means using the first way. Changing it to "true" will make it use the second way.
For more information about configuration, see here: https://github.com/gigya/microdot/wiki/Configuration-Repository
from microdot.
The issue in the samples was fixed by the following pull request:
But it was merged into the branch 1_Basic_Gpu_Service
. Try pulling that branch.
from microdot.
Related Issues (20)
- questions/discussions HOT 36
- .NET Core 2.0? HOT 14
- Does it load balance? HOT 1
- Error CS8002: Referenced assembly 'Gigya.ServiceContract, Version=2.5.5.0, Culture=neutral, PublicKeyToken=null' does not have a strong name. HOT 10
- Do you have a plan to add wiki pages? HOT 1
- About the value of ConsulEndPoint.HostName HOT 1
- Spelling Mistake in description HOT 1
- the best way HOT 4
- Lack of Documentation HOT 5
- how to publish on docker HOT 1
- Status on .NET Core HOT 3
- Help with inventory sample
- ServiceProxyProvider HOT 1
- Cannot build Microdot Solution HOT 1
- Is this project still maintained HOT 4
- [rl-assigned_teams-2] Violation against OSS Rules of Play
- [rl-assigned_teams-3] Violation against OSS Rules of Play
- [rl-reuse_tool-1] Violation against OSS Rules of Play
- Cannot build HOT 5
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from microdot.