• Stars
    star
    168
  • Rank 225,507 (Top 5 %)
  • Language
    JavaScript
  • License
    MIT License
  • Created almost 7 years ago
  • Updated over 1 year ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

HTTP cache server, such as varnish

pike

Build Status

与varnish类似的HTTP缓存服务器,主要的特性如下:

  • 提供WEB的管理配置界面,简单易上手
  • 支持br与gzip两种压缩方式,根据客户端自动选择。对于可缓存与不可缓存请求使用不同的压缩配置,更佳的时间与空间的平衡
  • 仅基于Cache-Control生成缓存有效期,接口缓存完全由接口开发者决定,准确而高效(开发比运维更清楚接口是否可缓存,可缓存时长)
  • 配置支持文件与etcd两种形式存储,无中断的配置实时更新
  • 支持H2C的转发,提升与后端服务的调用性能(如果是内网转发,不需要启用)
  • 与upstream的调用支持gzipbrotlilz4snappy以及zstd压缩,可根据与upstream的网络线路选择合适的压缩方式
  • 支持upstream检测失败时回调告警,可及时获取异常upstream信息
  • 支持自定义日志,可配置按日期与大小分割日志并压缩
  • LUR与持久化存储(可选)配合使用,可根据内存使用选择更小的LRU缓存并增加持久化存储的方式
  • 持久化存储支持以下形式:badger(文件)、redis以及mongodb

启动方式

启动参数主要如下:

  • config 配置保存地址,可以指定为etcd或者本地文件,如:etcd://user:[email protected]:2379/pike,本地文件:/opt/pike/config.yml
  • admin 配置管理后台的访问地址,如:--admin=:9013
  • log 日志文件目录,支持单文件与lumberjack形式,如/var/pike.loglumberjack:///tmp/pike.log?maxSize=100&maxAge=1&compress=true,lumberjack会根据文件内容大小与时间将文件分割

使用文件保存配置

# linux etcd,管理后台使用9013端口访问
./pike --config=etcd://127.0.0.1:2379/pike --admin=:9013
# linux file,配置文件保存在/opt/pike.yml,管理后台使用9013端口访问
./pike --config=/opt/pike.yml --admin=:9013

# docker
docker run -it --rm \
    -p 9013:9013 \
    vicanso/pike:4.0.0-alpha --config=etcd://172.16.183.177:2379/pike --admin=:9013

TODO

  • 缓存查询(如果缓存量较大,有可能导致查询性能较差,暂时未支持)

More Repositories

1

diving

Exploring each layer in a docker image
JavaScript
259
star
2

cyberapi

API tool based on tauri, it is smaller and faster.
Rust
151
star
3

go-charts

A charts library for Golang
Go
140
star
4

articles

my articles
JavaScript
99
star
5

influxdb-nodejs

Simple influxdb client
JavaScript
85
star
6

async-local-storage

local storage that is shared between all stack frames (top down) in a call chain, including async function
JavaScript
73
star
7

tiny-site

图片优化
Go
72
star
8

elton

High performance, simple Go web framework
Go
61
star
9

go-axios

HTTP Request package for golang.
Go
45
star
10

cyber-tect

checker for tcp udp and http
Go
26
star
11

tiny

compress data for better performance
Go
21
star
12

npm-trend

Get the trend of npm
JavaScript
17
star
13

proxy-pool

http(s) proxy pool
Go
16
star
14

jtstats

statistics server
JavaScript
11
star
15

location

Go
10
star
16

varnish-agent

让varnish更简单
Go
9
star
17

influx-ql

Simple way for influx ql
JavaScript
9
star
18

koa-log

logger middlware for koa
JavaScript
9
star
19

base

jquery ui
CoffeeScript
8
star
20

go-stringify

golang stringify function like javascript
Go
7
star
21

superagent-load-balancer

load balacner plugin for superagent
JavaScript
6
star
22

performance-nodejs

get nodejs performance, such as: heap statistics, event loop delay
JavaScript
6
star
23

dcharts

A powerful charting and visualization library is based on d3
JavaScript
6
star
24

forest

web framework by elton
Go
6
star
25

go-cache

lru and redis cache
Go
6
star
26

nano-seconds

Get the nano seconds of current time
JavaScript
5
star
27

jtdashboard

jtstats dashboard
JavaScript
4
star
28

promise-memorize

Generate function for cache promise result
JavaScript
4
star
29

koa-rest-version

koa rest version parser
JavaScript
4
star
30

varnish-generator

The simple way of generating general vcl file for varnish
JavaScript
4
star
31

web-screenshot

screenshot of web
Go
3
star
32

lru-store

A lru store for browser
JavaScript
3
star
33

superjson

json picker and converter
Go
3
star
34

session

simple session
Go
2
star
35

supervisor

backend supervisor
JavaScript
2
star
36

elite-server

Go
2
star
37

consul-client

consul client
JavaScript
2
star
38

lru-ttl

lru cache with ttl
Go
2
star
39

jtui

jquery ui backbone
CoffeeScript
2
star
40

haproxy-agent

generate haproxy config
JavaScript
2
star
41

jtfileimporter

import css js file
JavaScript
2
star
42

dockerfiles

my docker file
VCL
2
star
43

upstream

proxy upstream
Go
2
star
44

koa-simple-session

koa 2.x session store with file, redis or others.
JavaScript
2
star
45

superagent-extend

extend superagent
JavaScript
2
star
46

aslant

graphing and visualization application for influxdb
JavaScript
2
star
47

image-pipeline-server

Go
2
star
48

elton-proxy

Proxy middleware for elton.
Go
2
star
49

awesome-go

It's a mirror of `avelino/awesome-go`, which sorts the repos by stars, while original `awesome-go` sorts by alphabet only.
Go
2
star
50

jtstatic

node static
JavaScript
2
star
51

albi

Web framework base on koa 2.x
JavaScript
2
star
52

elton-session

Session middleware for elton, it supports multi storage.
Go
2
star
53

jtprocfs-stats

系统性能监控
JavaScript
2
star
54

dnscache

dns cache
Go
2
star
55

wsl

卫斯理小说
Go
2
star
56

static

serve static file for http
Go
2
star
57

diving-rs

Exploring each layer in a docker image, it's fast and simple
Rust
2
star
58

timtam-logger

log for node.js
JavaScript
2
star
59

koa-http-stats

http stats middleware for koa
JavaScript
1
star
60

aslant.site

The source of aslant.site
HTML
1
star
61

spt

koa framework
JavaScript
1
star
62

jtstats_client

stats client
HTML
1
star
63

mongostat-influxdb

Get mongo stat and insert into influxdb
JavaScript
1
star
64

go-performance

performance of application, include cpu, memory usage, and etc.
Go
1
star
65

dns-server

dns server
JavaScript
1
star
66

nginx-alpine

The nginx docker
Dockerfile
1
star
67

koa-connection-limit

koa middleware
JavaScript
1
star
68

compression-performance

Go
1
star
69

jtstats_server

statistics server
JavaScript
1
star
70

cookies

Signed and unsigned cookies based on Keygrip
Go
1
star
71

jtlog_analyze

log analyze
JavaScript
1
star
72

varnish-alpine

Varnish docker image base on alpine
VCL
1
star
73

viperx

extend viper
Go
1
star
74

coredns-admin

admin for coredns
JavaScript
1
star
75

alarms

my alarms server
Go
1
star
76

jtcluster

node cluster
JavaScript
1
star
77

go-haproxy-agent

Go
1
star
78

mongoose-save4update

JavaScript
1
star
79

kit

vue framework
CSS
1
star
80

ips

Check ip is exists in iplist
Go
1
star
81

tiny-client

tiny cli client
Go
1
star
82

shadow

Go
1
star
83

code-identifier

stateless code identifier
JavaScript
1
star
84

supertiming

function timing
JavaScript
1
star
85

x

my open source projects
1
star
86

koa_base

koa base
1
star
87

superlocation

get mobile location
JavaScript
1
star
88

timtam

JavaScript
1
star
89

wsl-web

卫斯理小说网页
1
star
90

image-optim

Rust
1
star
91

hes

custom errors
Go
1
star
92

count-warner

count warner, when the count greater than limit, it will tigger a warn event
Go
1
star
93

warner

If meet the required criterion, it will trigger an event.
JavaScript
1
star
94

vicanso.github.io

HTML
1
star
95

jtsys

system monitor
HTML
1
star
96

go-gauge

simple measure for sum and mean
Go
1
star
97

repos

my repositories
1
star
98

elton-logger

Go
1
star
99

novel-backend

JavaScript
1
star
100

koa-varnish

The cache middleware for koa, it can cache the data such as varnish.
JavaScript
1
star