单节点模式
单节点情况无需任何中间件与数据库。适用于:
- 快速体验
- 嵌入式部署
- 中小团队
下载
你可以在 release 页面上下载到你需要的二进制文件。
https://github.com/opensibyl/sibyl2/releases
使用
- 在办公电脑、嵌入式设备上一键部署并保持良好的性能;
- 具备基础的抗压能力与持久化能力;
- 默认情况下你的数据会被持久化在
./sibyl2-badger-storage
中;
嵌入式存储带来了:
- 极好的性能,你几乎不会遇到堆积;
- 但难以横向扩展与容灾;
如果你希望使用分布式存储,则可考虑下一个章节集群模式。
启动服务端
./sibyl server
你可以看到,你的服务已经启动了。
[GIN-debug] GET /api/v1/file --> github.com/opensibyl/sibyl2/pkg/server.HandleFileQuery (3 handlers)
[GIN-debug] GET /api/v1/func --> github.com/opensibyl/sibyl2/pkg/server.HandleFunctionsQuery (3 handlers)
[GIN-debug] GET /api/v1/funcctx --> github.com/opensibyl/sibyl2/pkg/server.HandleFunctionCtxQuery (3 handlers)
[GIN-debug] POST /api/v1/func --> github.com/opensibyl/sibyl2/pkg/server.HandleRepoFuncUpload (3 handlers)
[GIN-debug] POST /api/v1/funcctx --> github.com/opensibyl/sibyl2/pkg/server.HandleFunctionContextUpload (3 handlers)
[GIN-debug] GET /api/v1/admin/upload/status --> github.com/opensibyl/sibyl2/pkg/server.HandleStatusUpload (3 handlers)
[GIN-debug] [WARNING] You trusted all proxies, this is NOT safe. We recommend you to set a value.
Please check https://pkg.go.dev/github.com/gin-gonic/gin#readme-don-t-trust-all-proxies for details.
[GIN-debug] Listening and serving HTTP on :9876
不需要额外配置数据库与中间件,一切就完成了。你现在可以开始上传数据了。