Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/vimeo/libvmod-boltsort
A fast Varnish module for sorting query string parameters.
https://github.com/vimeo/libvmod-boltsort
Last synced: 3 days ago
JSON representation
A fast Varnish module for sorting query string parameters.
- Host: GitHub
- URL: https://github.com/vimeo/libvmod-boltsort
- Owner: vimeo
- License: other
- Created: 2012-09-17T17:22:30.000Z (about 12 years ago)
- Default Branch: 3.0
- Last Pushed: 2015-09-10T01:19:56.000Z (about 9 years ago)
- Last Synced: 2024-05-20T04:11:00.633Z (6 months ago)
- Language: C
- Homepage:
- Size: 195 KB
- Stars: 58
- Watchers: 30
- Forks: 16
- Open Issues: 1
-
Metadata Files:
- Readme: README.rst
- License: COPYING
Awesome Lists containing this project
README
=============
vmod_boltsort
=============-----------------------
Varnish boltsort Module
-----------------------:Author: Naren Venkataraman
:Date: 2012-09-01
:Version: 1.0
:Manual section: 3SYNOPSIS
========At Vimeo we use Varnish Cache to cache our player traffic. It has
worked out great for us.Varnish at this point has no built in module to sort querystrings.
Say I have two of these:* /video/48088296?title=0&byline=0&portrait=0&color=51a516
* /video/48088296?byline=0&color=51a516&portrait=0&title=0Boltsort sorts the querystring and ensures that Varnish treats the
above one and the same.DESCRIPTION
===========The boltsort Varnish vmod sorts querystring.
* Insertion sort on tokenized querystring params makes it twice as fast as current qsort implementations
* Custom param compare instead of storing param lengths for each querystring param means lesser stack usageFUNCTIONS
=========sort
-----Prototype
::sort(STRING S)
Return value
STRING
Description
Returns url with querystring sorted
Example
::set req.url = boltsort.sort(req.url);
INSTALLATION
============
Same as libvmod-example installation instructionsUsage::
yum install python-docutils or apt-get install python-docutils
./autogen.sh
./configure VARNISHSRC=DIR [VMODDIR=DIR]`VARNISHSRC` is the directory of the Varnish source tree for which to
compile your vmod. Both the `VARNISHSRC` and `VARNISHSRC/include`
will be added to the include search paths for your module.Optionally you can also set the vmod install directory by adding
`VMODDIR=DIR` (defaults to the pkg-config discovered directory from your
Varnish installation).Make targets:
* make - builds the vmod
* make install - installs your vmod in `VMODDIR`
* make check - runs the unit tests in ``src/tests/*.vtc``In your VCL you could then use this vmod along the following lines::
import boltsort;sub vcl_hash {
# sort the querysting and use the sorted one for hashing
set req.url = boltsort.sort(req.url);
}COPYRIGHT
=========This document is licensed under the same license as the
libvmod-boltsort project. See LICENSE for details.* Copyright (c) 2012 Vimeo