Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/cbuschka/go-runproxy
google cloud run app proxy
https://github.com/cbuschka/go-runproxy
gcp gcp-cloud-run golang proxy spring-boot startup
Last synced: about 2 months ago
JSON representation
google cloud run app proxy
- Host: GitHub
- URL: https://github.com/cbuschka/go-runproxy
- Owner: cbuschka
- License: apache-2.0
- Created: 2022-02-13T20:01:32.000Z (almost 3 years ago)
- Default Branch: main
- Last Pushed: 2022-07-02T06:36:03.000Z (over 2 years ago)
- Last Synced: 2024-05-09T14:26:24.126Z (8 months ago)
- Topics: gcp, gcp-cloud-run, golang, proxy, spring-boot, startup
- Language: Go
- Homepage:
- Size: 56.6 KB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: readme.md
- License: license.txt
Awesome Lists containing this project
README
# go-runproxy - google cloud run app proxy
### Background
When cloud run (container service on google cloud platform) starts a new service revision it grants computation
resources for initialization. These resources will we revoked when the maximum startup time is reached or the service
opens a receiving socket. In case when the service opens the socket before startup has finished (as it can be the case
with particular spring boot configurations) the service is throttled and cannot finish startup anymore.runproxy is a small tcp proxy that checks the service if it has come up yet (e.g. via a magic line appearing in the
log output) and subsequently opens a socket to signal cloud run that the container is ready.```bash
runproxy \
# listen on 0.0.0.0:8080 and forward tcp conns to 127.0.0.1:8181
-l 0.0.0.0:8080 \
-d 127.0.0.1:8181 \
# assume the app has been started if the following pattern matches a line in the stdout output
-m '^.*Started application in.*seconds.*$' \
# the command line to launch the downstream app
-- java -jar app.jar
```## Hints
* Make sure the output channel of your service is unbuffered. In case of python use -u flag.## License
Copyright (c) 2022 by [Cornelius Buschka](https://github.com/cbuschka).
[Apache License, Version 2.0](./license.txt)