When working with key-value store, such as memcached, we usually use URL
to generate unique key for each object.
But unfortunately, each URL may have several forms, for example:
1) http://abc.com/search?text=Hello+G%C3%BCnter#h1
2) http://ABC.COM/search?text=Hello+G%c3%bcnter#h1
3) HTTP://abc.com/search?text=Hello+G%C3%BCnter#h3
All above froms are refer to the same object. So we have to normalize URL
before generating object key.
As we known, URL syntax looks like:
<scheme>://<user>:<password>@<host>:<port>/<path>;<params>?<query>#<frag>
The $normalized_request variable is the normalized form of URL, which will:
- exclude #<frag> part from URL.
- convert <scheme> and <host> to lower-case.
- convert all escape characters(%nn) in <path> to upper-case.
Signed-off-by: Yunkai Zhang <qiushu.zyk@taobao.com>
If fail_timeout is enabled and fallback action is specified
to either "stale" or "next", a segmentation fault would happen.
Signed-off-by: Paul Yang(InfoHunter) <paulyang.inf@gmail.com>
This is version 1, the "imperfect" version.
Introduces a new directive with two parameters into upstream context:
Directive:
*) dynamic_resolve: enables dynamic resolving functionality on an upstream.
Parameters:
*) fail_timeout=time, specifies how long tengine will not launch
a dns query if the dns server is down.
*) fallback=action, specifies what action to take if the dns server is
considered as "down".
Support:
*) use the first result of a dns response
*) fail_timeout
*) fallback action, but the action "stale" is limited to use what tengine gets
when it parses the configuration
Not Support:
*) all results from a dns response
*) ipv6 address
*) using stale dns data
All "Not support" stuff are now supported in "perfect" version, which
will be released after tengine is upgraded to original nginx 1.6.x
branch.
Test cases are included.
Signed-off-by: Paul Yang(InfoHunter) <paulyang.inf@gmail.com>
Two new directives are introduced:
*) sysguard_mode and/or
*) sysguard_rt rt=time period=time action=some_location
This feature introduces the ability to limit requests based on "rt".
Also, all the measurements can be considered in an "and" or "or"
relationship due to the new "sysguard_mode" directive.
Test cases are included.
Signed-off-by: Paul Yang(InfoHunter) <paulyang.inf@gmail.com>
http://docs.travis-ci.com/user/getting-started/
If we link travis-ci.org to https://github.com/alibaba/tengine,
we can perform continuous testing against new commits to ensure
they do not break the build. travis-ci.org is a free service.
This commit provides an appropriate configuration file to tell
travis-ci.org about tengine and how we build it from source.