Skip to content

Commit

Permalink
Deploy QUIC Proxy (#210)
Browse files Browse the repository at this point in the history
* Load listen addr from env

* Add deployment config for quic-forward-proxy

* ipv6 support

* Fix rpc_tester

* Read QUIC_PROXY_ADDR from env

* Add traces for debugging

* Add timeout for writing to SendStream

* disable GSO (Generic Segmentation Offload) for all outgoing QUIC-connects

should fix #199

* disable GSO (Generic Segmentation Offload) for all outgoing QUIC-connects (#200)

should fix #199

Co-authored-by: GroovieGermanikus <groovie@mango.markets>

* Add staging config, remove traces

* cargo fmt

* delete fly.toml - was split+renamed - see cd/

* remove misleading line

* comment on quic proxy

* revert some files

* Deploy dev from main, prod from production

---------

Co-authored-by: GroovieGermanikus <groovie@mango.markets>
Co-authored-by: Steve <95291500+grooviegermanikus@users.noreply.github.com>
  • Loading branch information
3 people authored Dec 1, 2023
1 parent 8760021 commit c63a212
Show file tree
Hide file tree
Showing 6 changed files with 52 additions and 40 deletions.
24 changes: 24 additions & 0 deletions .github/workflows/fly-deploy-staging.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
name: Deploy to Fly

on:
push:
branches: [main]

env:
FLY_API_TOKEN: ${{ secrets.FLY_API_TOKEN }}

jobs:
deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2

- name: Setup Fly
uses: superfly/flyctl-actions/setup-flyctl@master

- name: Deploy lite-rpc
run: flyctl deploy -c cd/lite-rpc-staging.toml --remote-only

# - name: Deploy quic-forward-proxy
# run: flyctl deploy -c cd/quic-forward-proxy.toml --remote-only
9 changes: 3 additions & 6 deletions .github/workflows/fly-deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: Deploy to Fly

on:
push:
branches: [main]
branches: [production]

env:
FLY_API_TOKEN: ${{ secrets.FLY_API_TOKEN }}
Expand All @@ -17,11 +17,8 @@ jobs:
- name: Setup Fly
uses: superfly/flyctl-actions/setup-flyctl@master

- name: Deploy
run: flyctl deploy --remote-only

# - name: Deploy lite-rpc
# run: flyctl deploy -c cd/lite-rpc.toml --remote-only
- name: Deploy lite-rpc
run: flyctl deploy -c cd/lite-rpc.toml --remote-only

# - name: Deploy quic-forward-proxy
# run: flyctl deploy -c cd/quic-forward-proxy.toml --remote-only
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ need to explicitly disable GSO (Generic Segmenatin Offload) see
fly apps create my-lite-rpc
fly secrets set -a my-lite-rpc RPC_URL=... WS_URL=... # See above table for env options
fly scale vm dedicated-cpu-2x --memory 4096 -a my-lite-rpc
fly deploy -a my-lite-rpc --remote-only # To just launch lite-rpc
fly deploy -c cd/lite-rpc.toml -a my-lite-rpc --remote-only # To just launch lite-rpc
fly deploy -c cd/lite-rpc.toml -a my-lite-rpc --remote-only # To launch lite-rpc with proxy mode
```

Expand Down
23 changes: 23 additions & 0 deletions cd/lite-rpc-staging.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
#
# LiteRPC entrypoint will be served under https://api.mngo.cloud/lite-rpc-staging/v1/
#

app = "solana-lite-rpc-staging"
kill_signal = "SIGINT"
kill_timeout = 5
primary_region = "nrt"

[build]
dockerfile = "../Dockerfile"

[experimental]
cmd = ["sh", "-c", "lite-rpc --rpc-addr $RPC_URL --ws-addr $WS_URL"]

[env]
PORT_HTTP = "8890"
PORT_WS = "8891"
RUST_LOG = "info"

[metrics]
path = "/metrics"
port = 9091
2 changes: 1 addition & 1 deletion cd/lite-rpc.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ kill_timeout = 5
dockerfile = "../Dockerfile"

[experimental]
cmd = ["sh", "-c", "lite-rpc --rpc-addr $RPC_URL --ws-addr $WS_URL --quic-proxy-addr $QUIC_PROXY_ADDR"]
cmd = ["sh", "-c", "lite-rpc --rpc-addr $RPC_URL --ws-addr $WS_URL"]

[env]
PORT_HTTP = "8890"
Expand Down
32 changes: 0 additions & 32 deletions fly.toml

This file was deleted.

0 comments on commit c63a212

Please sign in to comment.