-
Notifications
You must be signed in to change notification settings - Fork 406
Description
UPDATE: See summary of options in #992 (comment)
This is a ticket to discuss and compare possible solutions, based on the criteria listed below.
We plan to convert dvc.org to gatsby and merge it with the blog. Right now, dvc.org is hosted on Heroku, and the blog is hosted on Netlify. We need to choose one hosting that will work for both of those services' needs.
What we want:
API endpoints
dvc.org and blog both use some custom API endpoints to fetch and transform data from github and discourse. We also need to be able to cache the results of these requests because they are not very fast and shouldn't be updated more often than once in 15 minutes.
Right now, this is implemented as Node.js server on Heroku with in-memory cache, but we wouldn't necessarily have a server after we migrate to gatsby. Also, our current implementation has a problem - for the first user that will try to access the page until the cache is created, load time can be quite significant (~10s). Ideally, we should perform cache update ourselves with something like cron and always sent cached results for all of our users.
To solve this, we can use Netlify functions, Cloudflare workers, or something else.
Redirects
We have a large list of redirects that we need to support https://github.com/iterative/dvc.org/blob/master/redirects-list.json
New hosting should allow it.
Build time
Our current build time for the blog on Netlify is long, 7m now, and will only get longer after we merge it with the main site. We can speed it up by preserving .cache dir, yarn module cache between builds. A new hosting/build option should allow us to preserve them.
Demo stands
Right now, both Netlify and Hero allow us to automatically created preview stands from github PRs. We want to have this functionality in the future too.
--
Our new hosting solution may be not one server, but a combination of the few different ones, e. g. CircleCI + Cloudflare Workers + Netlify/Now.sh, but it should be able to all of the things listed above.