3 ms·
I made a varnish urlsort module a while ago: https://github.com/cyberroadie/varnish-urlsort https://github.com/cyberroadie/varnish-urlsort Here my blog post ab
by cyberroadie 14y ago
I made a varnish urlsort module a while ago:
https://github.com/cyberroadie/varnish-urlsort https://github.com/cyberroadie/varnish-urlsort
Here my blog post about it:
http://cyberroadie.wordpress.com/2012/01/05/varnish-reordering-query-string/ http://cyberroadie.wordpress.com/2012/01/05/varnish-reorderi...
It parses the url and every token gets added to a binary tree which than gets traversed in order to get the parameters alphabetically
It's been used in production in several companies I worked for, so tried and tested :-)
Olivier
- cageface 14y agoInteresting. Do you have any benchmarks handy to show how much of a difference this makes? I'd wonder if the dynamic allocations necessary to build the tree might undercut the lookup advantages.