Comments (4)
The largest change that will be necessary to make ts-bridge run without App Engine is probably migrating metric records from App Engine Datastore API to Cloud Datastore (trivial) or another database (a bit harder). I would recommend Cloud Datastore, since the API is very similar. I suspect at some point this might become necessary even on App Engine, since newer App Engine Go runtimes no longer support proprietary App Engine APIs.
The second significant change is to make something trigger the regular sync (which is currently done by App Engine cron):
- if you are moving to a container, you can just use a periodic timer within the running process.
- if you are moving to GCF, you could use Cloud Scheduler API.
As part of this you might also want to implement some basic locking to prevent multiple sync
operations from running concurrently (which can happen if you start multiple containers with the same configuration), since they will fight while trying to write data to Stackdriver. Since App Engine cron does not execute multiple concurrent operations, this has not been necessary on App Engine.
from ts-bridge.
@knyar @yanske1 - appreciate your thoughts on this.
from ts-bridge.
if you are moving to GCF, you could use Cloud Scheduler API.
Cloud Scheduler does not support VPC Service Controls as well. In case of K8S/GKE (which is a preferred product for a customer that is blocked at the moment) we could implement ts-bridge the following way:
- K8S deployment of size=1 that has single container pod that exposes / , /sync and /cleanup endpoints
- K8S ClusterIP service that exposes the deployment inside the cluster. To access index page(/) one can use kubectl port-forward , this allows to not expose index page to the outside world and do not have any external load balancers
- K8S CronJob that is scheduled every minute, it can be based on busybox or similar lightweight container, it just calls the /sync endpoint of ClusterIP service . As CronJobs have some limitations we should prevent multiple sync operations to run simultaneously.
- K8S CronJob that is scheduled every 12 hours and calls /cleanup enddpoint.
from ts-bridge.
#37 that @Temikus has pushed recently is the first step in addressing this issue.
from ts-bridge.
Related Issues (20)
- Refactor handler and tasks to use the same struct
- 1.16.x (just released) - test failure HOT 1
- Support Datadog labels
- Document alerting on missing metrics under README.md/#Internal Monitoring HOT 3
- Replace link to metric explorer from deprecated Stackdriver
- InfluxDB metric source - check that queries contain just 1 column HOT 2
- Unsupported google.golang.org/appengine version
- Fix TSBridge UserAgent presentation HOT 1
- ts-bridge needs argument credentials support
- Support credential flags HOT 1
- Investigate memory usage HOT 1
- Migrate off of Travis-CI HOT 1
- Add CI configuration that would build ready-to-use containers for all major platforms HOT 1
- Add security scanning to CI to ensure our images do not have inadvertent vulnerabilities
- Add a better approach for error handling in Cloud Build docker pull
- Refactor dependency handlers & external connections
- Run tests with different versions of Go
- Automate release with Github Actions
- Update version.go to use .ts-bridge-version
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ts-bridge.