Skip to content

Commit

Permalink
Added note about DNS
Browse files Browse the repository at this point in the history
  • Loading branch information
Eric Abbott committed Mar 10, 2012
1 parent e61e9cc commit 77f2ea4
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions README.md
Expand Up @@ -132,3 +132,11 @@ You can instrument class methods, just like instance methods, using the metaprog
AWS::S3::Base.singleton_class.extend StatsD::Instrument
AWS::S3::Base.singleton_class.statsd_measure :request, 'S3.request'
```

## Reliance on DNS
Out of the box StatsD is set up to be unidirectional fire-and-forget over UDP. Configuring the StatsD host to be a non-ip will trigger a DNS lookup (ie synchronous round trip network call) for each metric sent. This can be particularly problematic in clouds that have a shared DNS infrastructure such as AWS.

### Common Workarounds
1. Using an IP avoids the DNS lookup but generally requires an application deploy to change.
2. Hardcoding the DNS/IP pair in /etc/hosts allows the IP to change without redeploying your application but fails to scale as the number of servers increases.
3. Installing caching software such as nscd that uses the DNS TTL avoids most DNS lookups but makes the exact moment of change indeterminate.

0 comments on commit 77f2ea4

Please sign in to comment.