Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Redis cache for stream commit state, dpid mappings, and legacy history structs #30

Merged
merged 3 commits into from
Sep 17, 2024
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 11 additions & 1 deletion .env.example
Original file line number Diff line number Diff line change
@@ -1,7 +1,14 @@
PORT=5460
SUPABASE_URL=
SUPABASE_KEY=
IPFS_GATEWAY=https://ipfs.desci.com/ipfs

# Set these to run with a local redis instance, outside of the backend cluster
# REDIS_HOST=localhost
# REDIS_PORT=6379
# Short TTL's for tinkering with history loading
# CACHE_TTL_ANCHORED=60
# CACHE_TTL_PENDING=5

# If set to 1, the `/*` route will use the legacy handler
FALLBACK_RESOLVER=0

Expand All @@ -15,13 +22,16 @@ FALLBACK_RESOLVER=0
DPID_ENV=dev
OPTIMISM_RPC_URL=https://reverse-proxy-dev.desci.com/rpc_opt_sepolia
CERAMIC_URL=https://ceramic-dev.desci.com
IPFS_GATEWAY=https://ipfs.desci.com/ipfs

# Staging
# DPID_ENV=staging
# OPTIMISM_RPC_URL=https://reverse-proxy-staging.desci.com/rpc_opt_sepolia
# CERAMIC_URL=https://ceramic-prod.desci.com
# IPFS_GATEWAY=https://ipfs.desci.com/ipfs

# Prod
# DPID_ENV=production
# OPTIMISM_RPC_URL=https://reverse-proxy-prod.desci.com/rpc_opt_sepolia
# CERAMIC_URL=https://ceramic-prod.desci.com
# IPFS_GATEWAY=https://ipfs.desci.com/ipfs
5 changes: 5 additions & 0 deletions kubernetes/deployment.dev.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,11 @@ spec:
export OPTIMISM_RPC_URL={{ .Data.OPTIMISM_RPC_URL }}
export CERAMIC_URL={{ .Data.CERAMIC_URL }}
export FALLBACK_RESOLVER={{ .Data.FALLBACK_RESOLVER }}

export REDIS_HOST={{ .Data.REDIS_HOST }}
export REDIS_PORT={{ .Data.REDIS_PORT }}
export CACHE_TTL_ANCHORED={{ .Data.CACHE_TTL_ANCHORED }}
export CACHE_TTL_PENDING={{ .Data.CACHE_TTL_PENDING }}
echo "loaded"
{{- end -}}
labels:
Expand Down
5 changes: 5 additions & 0 deletions kubernetes/deployment.prod.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,11 @@ spec:
export OPTIMISM_RPC_URL={{ .Data.OPTIMISM_RPC_URL }}
export CERAMIC_URL={{ .Data.CERAMIC_URL }}
export FALLBACK_RESOLVER={{ .Data.FALLBACK_RESOLVER }}

export REDIS_HOST={{ .Data.REDIS_HOST }}
export REDIS_PORT={{ .Data.REDIS_PORT }}
export CACHE_TTL_ANCHORED={{ .Data.CACHE_TTL_ANCHORED }}
export CACHE_TTL_PENDING={{ .Data.CACHE_TTL_PENDING }}
echo "loaded"
{{- end -}}
labels:
Expand Down
5 changes: 5 additions & 0 deletions kubernetes/deployment.staging.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,11 @@ spec:
export OPTIMISM_RPC_URL={{ .Data.OPTIMISM_RPC_URL }}
export CERAMIC_URL={{ .Data.CERAMIC_URL }}
export FALLBACK_RESOLVER={{ .Data.FALLBACK_RESOLVER }}

export REDIS_HOST={{ .Data.REDIS_HOST }}
export REDIS_PORT={{ .Data.REDIS_PORT }}
export CACHE_TTL_ANCHORED={{ .Data.CACHE_TTL_ANCHORED }}
export CACHE_TTL_PENDING={{ .Data.CACHE_TTL_PENDING }}
echo "loaded"
{{- end -}}
labels:
Expand Down
161 changes: 161 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@
"pino": "^9.2.0",
"pino-http": "^10.1.0",
"pino-pretty": "^11.2.1",
"redis": "^4.7.0",
"url-safe-base64": "^1.2.0"
}
}
Loading
Loading