Skip to content

Commit 1ee12f0

Browse files
committed
Update README with recent API changes.
1 parent 0196098 commit 1ee12f0

File tree

1 file changed

+14
-14
lines changed

1 file changed

+14
-14
lines changed

README.md

+14-14
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
An nginx module to resolve domain names inside upstreams and keep them up to date.
44

5-
By default, servers defined in nginx upstreams are only resolved when nginx starts. This module provides an alternative `dynamic_server` directive that can be used to asyncronously resolve upstream domain names. This keeps the upstream definition up to date according to the DNS TTL of each domain names. This can be useful if you want to use upstreams for dynamic types of domain names that may frequently change IP addresses.
5+
By default, servers defined in nginx upstreams are only resolved when nginx starts. This module provides an additional `resolve` parameter for `server` definitions that can be used to asynchronously resolve upstream domain names. This keeps the upstream definition up to date according to the DNS TTL of each domain names. This can be useful if you want to use upstreams for dynamic types of domain names that may frequently change IP addresses.
66

77
This module also allows nginx to start if an upstream contains a defunct domain name that no longer resolves. By default, nginx will fail to start if an upstream server contains an unresolvable domain name. With this module, nginx is still allowed to start with invalid domain names, but an error will be logged and the unresolvable domain names will be marked as down.
88

@@ -15,9 +15,9 @@ make && make install
1515

1616
## Usage
1717

18-
Use the `dynamic_server` definition inside your upstreams instead of the built-in `server` (`dyamic_server` should be a drop-in replacement).
18+
Use the `server` definition inside your upstreams and specify the `resolve` parameter.
1919

20-
*Note:* A `resolver` must be defined at the `http` level of nginx's config for `dynamic_server` to work.
20+
*Note:* A `resolver` must be defined at the `http` level of nginx's config for `resolve` to work.
2121

2222
```
2323
http {
@@ -31,28 +31,28 @@ http {
3131

3232
## Directives
3333

34-
### dynamic_server
34+
### server
3535

36-
**Syntax:** *server address [parameters]*;
37-
**Context** *upstream*
36+
**Syntax:** `server address [parameters];`
37+
**Context** `upstream`
3838

39-
Defines a server for an upstream. The differences between the default `server` and `dynamic_server` implementation:
39+
Defines a server for an upstream. The module adds the ability to specify a `resolve` parameter. When specified:
4040

4141
- Domain names will be resolved on an ongoing basis and kept up to date according to the TTL of each domain name.
4242
- Unresolvable domain names are considered non-fatal errors (but logged). nginx is allowed to startup if a domain name can't be resolved, but the server is marked as down.
4343

4444
The following parameters can be used (see nginx's [server documentation](http://nginx.org/en/docs/http/ngx_http_upstream_module.html#server) for details):
4545

46-
*weight=number*
47-
*max_fails=number*
48-
*fail_timeout=time*
49-
*backup*
50-
*down*
51-
*resolve*
46+
`weight=number`
47+
`max_fails=number`
48+
`fail_timeout=time`
49+
`backup`
50+
`down`
51+
`resolve`
5252

5353
# Compatibility
5454

55-
Tested with nginx 1.7.7.
55+
Tested with nginx 1.6, 1.7, 1.8, 1.9.
5656

5757
## Alternatives
5858

0 commit comments

Comments
 (0)