A human readable change log between our released versions can be found in here.
- Fix panicing on serving cached zero sized files
- Fix from 'github.com/MStoykov/mp4' for very rare index out of bounds
- Properly close log files. Previous versions were leaking open files in certain situations. It was happening after configuration reload in cases when the log file has been renamed, moved or removed.
-
Fix parsing pid files with whitespace around the actual pid.
-
Handler Proxy was balancing on the path + query which will not work well with consistent hashing. It`s now only on path.
- Now the git vars in the MakeFile can be overwritten with env variables for build where git is not present.
io_transfer_sizeconfiguration directive is split into two new directives:max_io_transfer_sizeandmin_io_transfer_size. The old one is removed. Generally, nedomi will try to read/write withmax_io_transfer_sizebytes per operation. But in cases when a connection is limit rated (a.k.a. throttled) themin_io_transfer_sizebytes will be the lower bound of bytes written per operation before sleeping. Lower values ofmin_io_transfer_sizewill result in finer limit rating for the cost of more CPU and IO load. The default values are:max_io_transfer_size- 1m,min_io_transfer_size- 128k.
-
Optimizations which reduce memory allocations. This results in much less garbage collection.
-
An common API for limit rating a connection. It can be used by any module/handler. See the next point for the first one. This API exposes an efficient method for maintaining a constant speed for the downstream connection. The main improvement is that this method does not result in excesive
os.Statcalls as was the previous. -
The throttling handle is rewritten and uses the new API.
- Access logs will now identify the virtual host for which the request was made by the
Hostheader sent by the client. Previously it was always identified by its primary name. That way information for the request was lost. For unknown virtual hosts or virtual hosts which do not match any location, the[unknown-location]string is appended to the virtual host identification.
- Upstream basic authentication challenges are no longer passed down to the client.
- Upstream addresses now support HTTP Basic Authenticate. This is achieved by adding the user and password to the upstream URL. Example: "http://user@password:domain.com"
- Served bytes were not correctly logged in the access log for requests which were satisfied using
sendfileand friends.
- All logs for particular request now have an unique Request ID printed alongside. Previously the
http.Requestmemory address was used. This was causing different requests to use the same ID sincehttp.Requestobjects are reused.
- The
viahandler is removed. The same thing can be achieved with theheadershandler and itsadd_headersdirective.
-
The
io_transfer_sizedirective is introduced. It can control the size of all IO operations done by nedomi. Basically, this is the size used insendfile,writeandreadnetwork calls. Previously this value was hard coded to 128k and this is now the default. -
As a performance improvements, some checks are removed when serving files from cache. Most notably, now nedomi does not check if the size of the stored object match the configured one. Tampering with the cache files can now result in weird behaviour.
-
Retrying an upstream was causing a goroutine leaks because the initial upstream request was not cleaned up correctly.
-
Reloading the cache from storage was not working when
skip_cache_key_in_pathis used. -
Making a cache zone smaller via reload of the configuration was not removing all discarded file objects from the cache algorithm memory properly.
-
Upstream requests will use proper
Hostheader without any configuration. There was an unintended behaviour where this header was set to the IP address of the upstream. -
Configuration reloading had no effect on
write_timeoutandread_timeoutdirectives. They are now properly set. -
There was a bug where in some situations connections would time out server side earlier than configured.
- Some error messages have their priority lowered. Logging only errors will result in much small log files now.
-
A major bug in retrying with different upstream (introduced in v0.1.6) is fixed. It was causing a crash. The bug manifested itself when the configured upstream for retrying was not found.
-
Cache zones in the status page are now sorted. Previously every refresh was causing a reordering of the zones.
-
Further extend the efficient buffer copying mechanism from v0.1.5. It now works in tandem with the flv handler and the rewrite headers handler.
-
Upstream retrying in the proxy handler is now possible. A handler can now define a new upstream to be retried via the
try_other_upstream_on_codesetting. Using it certain HTTP error codes from the first upstream can be configured to cause an additional request (retry) from a second upstream.
- Nedomi can now utilise more efficient OS syscalls for copying data in some situations. For example, with cached files in Linux the
sendfilesyscall will be used to bridge the opened file and network socket directly in kernel space. For other systems, their respectful method for efficient copying will be used. This behaviour is made possible by the golang's standard library.
- Updated the mp4 lib used for pseudo streaming to its version 0.1.3. The previous version had a bug which was leading to permanently blocked go routines.
-
Read and write time outs (as set by
read_timeoutandwrite_timeout) were actually deadlines. Requests were expected to finish all of their reading and writing in the specified number of seconds. This is now changed to actual time outs on the connection. A time out will happen only if the connection is actually stalled. Reading or writing a single byte everyread/write_timeoutperiod means the connection will not be marked as stalled. -
Pulls a bug fix from the upstream mp4 library. In some situations the atom `udta' was not parsed correctly. The effect of this prematurely terminated request.
-
The
skip_cache_key_in_pathoption is added for a cache zone. By default it isfalseand the old behaviour for cache paths is used: inside the cache directory there will be one directory for every cache key used in this cache zone. When set totrueno "cache key directory" will be used and all cached files will be rooted in the cache zone directory. -
The
ketamaupstream balancing algorithm is renamed tolegacyketama. We are planning a better implementation of the algorithm but this one is still in use in some installations and must be kept for backward interoperability. Important! This change requires a change in the configuration file between v0.1.(0|1) and this one:ketamamust becomelegacyketama. -
New option
upstream_hash_prefixin the proxy handler. It is a string which will be used in front of the URIs as a key for the consistent hashing upstream balancing algorithms.
- The
jumpupstream balancing algorithm is removed. It turns out it is not suitable for our purposes at all.
- Numerous bug fixes in the balancing algorithms in corner cases. They all use a thread-safe random number generator now.
- The severity of many error messages is lowered to info or debug.
- More useful error messages on wrong syntax in the config file. An error will now be pointed out and some context will be printed.
- All access log lines now contain identification for which vhost they refer to.
- The purge module uses HTTP return code to signal that a purge was now unsuccessful for some reason.
- The combination between "Date" and "Cache-Control: max-age" response headers is more RFC compliant. The Date will be stored as-is from the origin server and max-age will be calculated as time after this Date.
- A bug in resizing down a cache zone with reload (
kill -HUP) made it possible for this zone to be larger than expected. In some situations it resulted in crashes.
- Starting with this one all release branches will have their dependencies vendored. For this end the
GO15VENDOREXPERIMENTis used and it can be seen in the Makefile. - Support for
go1.4is dropped.
- Initial Release