-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Mike Chamberlain
committed
Nov 15, 2018
1 parent
ab89b00
commit fec4c3c
Showing
3 changed files
with
10 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
## Do not use `MachineName` | ||
|
||
|
||
- Use of `MachineName` tightly couples your code to the our infrastructure and its naming scheme, which can and will change over time. | ||
- Your code should be agnostic of environment, data center, cluster and server. Having different code paths for different environments can lead to bugs that can only be caught in production. | ||
- Such environmental variations are usually only required when calling external services, as you will want to call the service running in your local data center. For this, use [Consul's service discovery](service-discovery.md). It automatically supplies the correct configuration based on your environment. | ||
|
||
One exception is logging, where it can be useful to see the exact DC / cluster / server that made the request. Here, it makes sense to log the machine name. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
## Use Consul's service discovery for server addresses | ||
|
||
Server IP addresses and DNS entries should be configured using Consol's service discovery feature. Do not use the [Key/Value](key-value.md) store for this. | ||
Server IP addresses and DNS entries should be configured using Consul's service discovery feature. Do not use the [Key/Value](key-value.md) store for this. |