Created
March 26, 2021 09:12
-
-
Save aondio/3b8238b593de47c854c015708c5be692 to your computer and use it in GitHub Desktop.
MSE governor and selection
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
mse.conf: | |
========= | |
env: { | |
id = "my_mse_id"; | |
memcache_size = "auto"; | |
books = ( { | |
id = "small"; | |
database_size = "1m"; | |
directory = "/var/lib/mse/book_small"; | |
stores = ( { | |
id = "store_small1" | |
filename = "/var/lib/mse/store_small1" | |
size = "1m"; | |
} , { | |
id = "store_small2" | |
filename = "/var/lib/mse/store_small2" | |
size = "1m"; | |
} ); | |
} , { | |
id = "big"; | |
database_size = "1m"; | |
directory = "${tmpdir}/book_big"; | |
stores = ( { | |
id = "store_big" | |
filename = "/var/lib/mse/store_big" | |
size = "2m"; | |
} , { | |
id = "store_huge" | |
filename = "/var/lib/mse/store_huge" | |
size = "6m"; | |
} ); | |
} ); | |
}; | |
VCL examples: | |
In the following examples only the stores with IDs "store_bug" and "store_huge" will be used. | |
The mse.set_weighting selects how stores should be weighted when a random store is needed for an object in the cache. | |
sub vcl_backend_response { | |
if (mse.set_stores("big")) { | |
set beresp.http.stores = "big"; | |
} else { | |
set beresp.http.stores = "unselected"; | |
} | |
mse.set_weighting(size); | |
} | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment