{"id":13583204,"url":"https://github.com/vicanso/pike","last_synced_at":"2025-08-21T00:32:05.000Z","repository":{"id":55993564,"uuid":"115622346","full_name":"vicanso/pike","owner":"vicanso","description":"HTTP cache server, such as varnish","archived":true,"fork":false,"pushed_at":"2025-07-06T04:19:40.000Z","size":18499,"stargazers_count":171,"open_issues_count":1,"forks_count":25,"subscribers_count":11,"default_branch":"master","last_synced_at":"2025-08-14T17:54:30.304Z","etag":null,"topics":["br","cache-server","caching","caching-proxy","elton","http-cache","varnish"],"latest_commit_sha":null,"homepage":"https://treexie.gitbook.io/pike/","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/vicanso.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null}},"created_at":"2017-12-28T12:42:13.000Z","updated_at":"2025-07-07T06:17:12.000Z","dependencies_parsed_at":"2024-04-08T16:59:05.453Z","dependency_job_id":"9a8ac088-e00b-4baa-a481-e91e315cf59e","html_url":"https://github.com/vicanso/pike","commit_stats":null,"previous_names":[],"tags_count":19,"template":false,"template_full_name":null,"purl":"pkg:github/vicanso/pike","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vicanso%2Fpike","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vicanso%2Fpike/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vicanso%2Fpike/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vicanso%2Fpike/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/vicanso","download_url":"https://codeload.github.com/vicanso/pike/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vicanso%2Fpike/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":271409446,"owners_count":24754715,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-08-20T02:00:09.606Z","response_time":69,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["br","cache-server","caching","caching-proxy","elton","http-cache","varnish"],"created_at":"2024-08-01T15:03:19.519Z","updated_at":"2025-08-21T00:32:04.994Z","avatar_url":"https://github.com/vicanso.png","language":"JavaScript","funding_links":[],"categories":["JavaScript"],"sub_categories":[],"readme":"# pike\n\n此项目已不再维护，建议使用基于pingora的[pingap](https://github.com/vicanso/pingap)项目。\n\n[![Build Status](https://github.com/vicanso/pike/workflows/Test/badge.svg)](https://github.com/vicanso/pike/actions)\n\n与varnish类似的HTTP缓存服务器，主要的特性如下：\n\n- 提供WEB的管理配置界面，简单易上手\n- 支持br与gzip两种压缩方式，根据客户端自动选择。对于可缓存与不可缓存请求使用不同的压缩配置，更佳的时间与空间的平衡\n- 仅基于`Cache-Control`生成缓存有效期，接口缓存完全由接口开发者决定，准确而高效(开发比运维更清楚接口是否可缓存，可缓存时长)\n- 配置支持文件与etcd两种形式存储，无中断的配置实时更新\n- 支持H2C的转发，提升与后端服务的调用性能（如果是内网转发，不需要启用）\n- 与upstream的调用支持`gzip`，`brotli`，`lz4`，`snappy`以及`zstd`压缩，可根据与upstream的网络线路选择合适的压缩方式\n- 支持upstream检测失败时回调告警，可及时获取异常upstream信息\n- 支持自定义日志，可配置按日期与大小分割日志并压缩\n- LUR与持久化存储（可选）配合使用，可根据内存使用选择更小的LRU缓存并增加持久化存储的方式\n- 持久化存储支持以下形式：badger(文件)、redis以及mongodb\n\n\u003cp align=\"center\"\u003e\n\u003cimg src=\"./docs/images/home.png\"/\u003e\n\u003c/p\u003e\n\n## 启动方式\n\n启动参数主要如下：\n\n- `config` 配置保存地址，可以指定为etcd或者本地文件，如：`etcd://user:pass@127.0.0.1:2379/pike`，本地文件：`/opt/pike/config.yml`\n- `admin` 配置管理后台的访问地址，如：`--admin=:9013`\n- `log` 日志文件目录，支持单文件与lumberjack形式，如`/var/pike.log`或`lumberjack:///tmp/pike.log?maxSize=100\u0026maxAge=1\u0026compress=true`，lumberjack会根据文件内容大小与时间将文件分割\n\n### 使用文件保存配置\n\n```bash\n# linux etcd，管理后台使用9013端口访问\n./pike --config=etcd://127.0.0.1:2379/pike --admin=:9013\n# linux file，配置文件保存在/opt/pike.yml，管理后台使用9013端口访问\n./pike --config=/opt/pike.yml --admin=:9013\n\n# docker\ndocker run -it --rm \\\n    -p 9013:9013 \\\n    vicanso/pike:4.0.0-alpha --config=etcd://172.16.183.177:2379/pike --admin=:9013\n```\n\n## TODO\n\n- 缓存查询（如果缓存量较大，有可能导致查询性能较差，暂时未支持）\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvicanso%2Fpike","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fvicanso%2Fpike","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvicanso%2Fpike/lists"}