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
local l = require('lpeg') | |
local clf = require('common_log_format') | |
local util = require('util') | |
l.locale(l) | |
local dt = require "date_time" | |
local integer = l.digit^1 / tonumber | |
local double = l.digit^1 * "." * l.digit^1 / tonumber | |
local lat_long = l.P"-"^-1 * l.digit^1 * ("." * l.digit^1)^-1 / tonumber |
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
# HELP haproxy_process_nbthread Configured number of threads. | |
# TYPE haproxy_process_nbthread gauge | |
haproxy_process_nbthread 4 | |
# HELP haproxy_process_nbproc Configured number of processes. | |
# TYPE haproxy_process_nbproc gauge | |
haproxy_process_nbproc 1 | |
# HELP haproxy_process_relative_process_id Relative process id, starting at 1. | |
# TYPE haproxy_process_relative_process_id gauge | |
haproxy_process_relative_process_id 1 | |
# HELP haproxy_process_start_time_seconds Start time in seconds. |
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
HA-Proxy version 2.0.8 2019/10/23 - https://haproxy.org/ | |
Build options : | |
TARGET = linux-glibc | |
CPU = generic | |
CC = gcc | |
CFLAGS = -O2 -g -fno-strict-aliasing -Wdeclaration-after-statement -fwrapv -Wno-unused-label -Wno-sign-compare -Wno-unused-parameter -Wno-old-style-declaration -Wno-ignored-qualifiers -Wno-clobbered -Wno-missing-field-initializers -Wtype-limits | |
OPTIONS = USE_PCRE=1 USE_OPENSSL=1 USE_ZLIB=1 USE_TFO=1 USE_NS=1 USE_SYSTEMD=1 | |
Feature list : +EPOLL -KQUEUE -MY_EPOLL -MY_SPLICE +NETFILTER +PCRE -PCRE_JIT -PCRE2 -PCRE2_JIT +POLL -PRIVATE_CACHE +THREAD -PTHREAD_PSHARED -REGPARM -STATIC_PCRE -STATIC_PCRE2 +TPROXY +LINUX_TPROXY +LINUX_SPLICE +LIBCRYPT +CRYPT_H -VSYSCALL +GETADDRINFO +OPENSSL -LUA +FUTEX +ACCEPT4 -MY_ACCEPT4 +ZLIB -SLZ +CPU_AFFINITY +TFO +NS +DL +RT -DEVICEATLAS -51DEGREES -WURFL +SYSTEMD -OBSOLETE_LINKER +PRCTL +THREAD_DUMP -EVPORTS |
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
global | |
log stdout local0 | |
defaults | |
mode http | |
resolvers main_resolver | |
nameserver dns1 8.8.8.8:53 | |
frontend fe_forwarder |
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
local http = require('ext.resty.http') | |
local c = require('imgix.hwy.common') | |
local cjson = require('cjson') | |
local _ngx = ngx | |
if _ngx.req.get_method() ~= 'REPLICATE' then | |
_ngx.status = _ngx.HTTP_NOT_ALLOWED | |
local e = string.format('unsupported method: %s', _ngx.req.get_method()) | |
_ngx.say(e) | |
_ngx.log(_ngx.ERR, e) |
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
[david@sjc1-b4-8 ~]$ go tool pprof $HOME/bin/hwy-fetcher http://localhost:6060/debug/pprof/heap | |
Fetching profile from http://localhost:6060/debug/pprof/heap | |
Saved profile in /home/david/pprof/pprof.hwy-fetcher.localhost:6060.inuse_objects.inuse_space.062.pb.gz | |
Entering interactive mode (type "help" for commands) | |
(pprof) top | |
12612.08MB of 14824.44MB total (85.08%) | |
Dropped 799 nodes (cum <= 74.12MB) | |
Showing top 10 nodes out of 87 (cum >= 201.56MB) | |
flat flat% sum% cum cum% | |
6202.85MB 41.84% 41.84% 6202.85MB 41.84% crypto/tls.(*block).reserve |
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
*** Segmentation fault | |
Register dump: | |
RAX: 000000000e0b2270 RBX: 00007f6d21771ae0 RCX: 000000004108f810 | |
RDX: 0000000041366b88 RSI: 0000000000000002 RDI: fffffffb411b4378 | |
RBP: 0000000040ac6710 R8 : 0000000001ca19c0 R9 : 0000000001ca19c0 | |
R10: 00000000401bd490 R11: 0000000000000000 R12: 0000000040cac460 | |
R13: 00007ffc4d750ca0 R14: 00000000411b6da8 R15: 000000004045cdf0 | |
RSP: 00007ffc4d6e45e0 |
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
from concurrent.futures import ThreadPoolExecutor | |
from tornado.concurrent import run_on_executor, Future | |
from tornado import httpclient,ioloop,web,gen | |
import request | |
import sys | |
httpclient.AsyncHTTPClient.configure('tornado.curl_httpclient.CurlAsyncHTTPClient', max_clients=10) | |
# TODO: remove | |
class Foo(Exception): pass | |
def dot(): |
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
51 yes | |
52 no | |
53 no | |
54 yes | |
55 no | |
56 no | |
57 yes | |
58 yes | |
59 no | |
60 no |
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
global | |
pidfile /var/run/haproxy.pid | |
stats socket /var/run/haproxy.sock mode 600 level admin | |
maxconn 10240 | |
user produser | |
group produser | |
log-tag gp_proxy | |
# daemon | |
description general purpose proxy, no image traffic through here |
NewerOlder