https://github.com/trendyol/sidecache
Sidecar cache for kubernetes applications.
https://github.com/trendyol/sidecache
cache couchbase golang istio kubernetes redis sidecar
Last synced: 3 months ago
JSON representation
Sidecar cache for kubernetes applications.
- Host: GitHub
- URL: https://github.com/trendyol/sidecache
- Owner: Trendyol
- License: mit
- Created: 2020-08-10T12:18:08.000Z (about 5 years ago)
- Default Branch: master
- Last Pushed: 2025-02-03T11:18:11.000Z (8 months ago)
- Last Synced: 2025-03-22T05:33:02.203Z (7 months ago)
- Topics: cache, couchbase, golang, istio, kubernetes, redis, sidecar
- Language: Go
- Homepage:
- Size: 57.6 KB
- Stars: 47
- Watchers: 8
- Forks: 7
- Open Issues: 4
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
README
# sidecache
Sidecar cache for kubernetes applications. It acts as a proxy sidecar between application and client, routes incoming requests to cache storage or application according to Istio VirtualService routing rules.Medium article: https://medium.com/trendyol-tech/trendyol-platform-team-caching-service-to-service-communications-on-kubernetes-istio-82327589b935
[](https://opensource.org/licenses/MIT)
## Table Of Contents
- [Istio Configuration](#istio-configuration-for-routing-http-requests-to-sidecar-container)
- [Environment Variables](#environment-variables)## Istio Configuration for Routing Http Requests to Sidecar Container
Below VirtualService is responsible for routing all get requests to port 9191 on your pod, other http requests goes to port 8080.
```
apiVersion: networking.istio.io/v1beta1
kind: VirtualService
metadata:
name: foo
spec:
gateways:
- foo-gateway
hosts:
- foo
http:
- match:
- method:
exact: GET
route:
- destination:
host: foo
port:
number: 9191
- route:
- destination:
host: foo
port:
number: 8080
```## Environment Variables
Environment variables for sidecar container.
- **MAIN_CONTAINER_PORT**: The port of main application to proxy.
- **COUCHBASE_HOST**: Couchbase host addr.
- **COUCHBASE_USERNAME**: Couchbase username.
- **COUCHBASE_PASSWORD**: Couchbase password.
- **BUCKET_NAME**: Couchbase cache bucket name.
- **CACHE_KEY_PREFIX**: Cache key prefix to prevent url conflicts between different applications.
- **SIDE_CACHE_PORT**: Sidecar container port to listen.