Git Product home page Git Product logo

Comments (4)

knyar avatar knyar commented on May 4, 2024 1

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.

Dnefedkin avatar Dnefedkin commented on May 4, 2024

@knyar @yanske1 - appreciate your thoughts on this.

from ts-bridge.

Dnefedkin avatar Dnefedkin commented on May 4, 2024

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.

Dnefedkin avatar Dnefedkin commented on May 4, 2024

#37 that @Temikus has pushed recently is the first step in addressing this issue.

from ts-bridge.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.