Skip to content

Instantly share code, notes, and snippets.

View lkarsten's full-sized avatar

Lasse Karstensen lkarsten

View GitHub Profile
vcl 4.0;
import std;
import directors;
backend a1 { .host = "192.0.2.11"; }
backend a2 { .host = "192.0.2.12"; }
backend a3 { .host = "192.0.2.13"; }
backend a4 { .host = "192.0.2.14"; }
#
# Example of pinterest.com -alike application deployment.
#
vcl 4.0;
import std;
import directors;
import cookie;
import header;
import var;
@lkarsten
lkarsten / gist:77a8a1a91d5956feaa40
Created September 7, 2015 18:38
varnish 4.1.0-beta1-dirty on el6 with selinux enabled
1074 setresuid(-1, 0, -1) = 0
1074 setresgid(-1, 0, -1) = 0
1074 open("/etc/varnish/secret", O_RDONLY) = 3
1074 close(3) = 0
1074 setresgid(-1, 496, -1) = 0
1074 setresuid(-1, 497, -1) = 0
1074 open("/etc/varnish/default.vcl", O_RDONLY) = 3
1074 fstat(3, {st_mode=S_IFREG|0644, st_size=1225, ...}) = 0
1074 read(3, "#\n# This is an example VCL file "..., 1226) = 1225
1074 close(3) = 0
#!/usr/bin/python
# mjaff
import re, sys, os, time
from mechanize import Browser
from pysqlite2 import dbapi2 as sqlite
import codecs
z = codecs.lookup("iso8859-1")
def fo(s):
even more important text here
#!/usr/bin/env python
# .- coding: utf-8 -.
"""
Collect and store varnishstat counters every n seconds for a time period.
This file is in the public domain.
Author: Lasse Karstensen <lkarsten@varnish-software.com>, August 2015.
"""
import sys
#
# hitch(8), The Scalable TLS Unwrapping Daemon's configuration
#
# NOTE: all config file parameters can be overriden
# from command line!
# Listening address. REQUIRED.
# Can be specified multiple times for multiple listen endpoints.
# type: string
From fb3faca3c6c58fa8c8f993e78b76c7206e135437 Mon Sep 17 00:00:00 2001
From: Jason Evans <jasone@canonware.com>
Date: Sun, 5 Oct 2014 13:05:10 -0700
Subject: [PATCH] Fix OOM-related regression in arena_tcache_fill_small().
Fix an OOM-related regression in arena_tcache_fill_small() that caused
cache corruption that would almost certainly expose the application to
undefined behavior, usually in the form of an allocation request
returning an already-allocated region, or somewhat less likely, a freed
region that had already been returned to the arena, thus making it
[Unit]
Description=Varnish HTTP accelerator
[Service]
Type=forking
LimitNOFILE=131072
LimitMEMLOCK=82000
ExecStartPre=/opt/varnish/sbin/varnishd -C -f /etc/varnish/default.vcl
ExecStart=/opt/varnish/sbin/varnishd -a :80 \
-T localhost:6082 \