Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Experiment with alternative CloudFlare deployment #2648

Closed
humphd opened this issue Jan 6, 2022 · 11 comments
Closed

Experiment with alternative CloudFlare deployment #2648

humphd opened this issue Jan 6, 2022 · 11 comments
Labels
area: deployment Production or Staging deployment area: performance Issues related to our performance type: enhancement New feature or request type: nice to have Feature that'd be nice to have, but not a priority type: research Requires researching and commenting what you have found

Comments

@humphd
Copy link
Contributor

humphd commented Jan 6, 2022

Reading https://blog.polyhaven.com/how-we-handle-80tb-and-5m-page-views-a-month-for-under-400/ last night, I wondered if there is anything we could do to improve our situation, specifically explore using CloudFlare for more aggressive caching (front-end assets, but also lots of our API calls). You can do a lot for free with them https://www.cloudflare.com/plans/free

@humphd humphd added type: enhancement New feature or request type: nice to have Feature that'd be nice to have, but not a priority area: deployment Production or Staging deployment Priority: Low area: performance Issues related to our performance labels Jan 6, 2022
@humphd
Copy link
Contributor Author

humphd commented Jan 7, 2022

CloudFlare Workers could also be an interesting way for us to replace some of our microservices with serverless functions. I also see they just shipped a local-dev version that would make this interesting to experiment with https://blog.cloudflare.com/miniflare/

@AmasiaNalbandian AmasiaNalbandian added this to the 2.6 Release milestone Jan 25, 2022
@aserputov
Copy link
Contributor

@humphd How bad Redis is caching individual Post. Do you think Cloudflare can do our front-end caching better?
What I mean exactly is if our quantiy of front-end data is enough to think of Cloudflare caching, or should I focus on serverless functions to replace microservices? As I understand, this topic is for the far future because we better get rid of our monolithic backed first and finally launch Parser service?

@humphd
Copy link
Contributor Author

humphd commented Jan 25, 2022

Redis is amazing at caching, that's its primary job. I would focus on caching static assets in the front-end to start.

@aserputov
Copy link
Contributor

@humphd, do you want me to cache the static files from the 'out' folder after building the front end?

@humphd
Copy link
Contributor Author

humphd commented Jan 26, 2022

I'm not sure what you're asking, can you give more details?

@aserputov
Copy link
Contributor

aserputov commented Mar 8, 2022

  1. First of all, CloudFlare is amazing!
    Start from this. After, for someone who will start implementing Cloudflare into Telescope, here is the best video to do it in a few quick steps. Cloudflare has servers worldwide, but precisely for our problem, it doesn't matter. Most of the requests to our servers come from Canada(Toronto), which will make our caching accuracy close to 100%. We need to create a new issue or implement it here, to move all our static files from src/web/public by simple:
    1.1. creating an account in Cloudflare
    1.2. Add DNS server.
    1.3. Add CNAME: "link to our static files server."
    You can watch the video above for more details.
  2. Serveless Functions - is a cloud computing execution model in which the cloud provider allocates machine resources on-demand, taking care of the servers on behalf of their customers. "Serverless" is a misnomer in the sense that servers are still used by cloud service providers to execute code for developers.
    Do we need to add serverless functionality to Telescope? After researching the topic, I would say that time has not yet come to use them. I don't think there is a vast necessity. Maybe in future. If you believe the opposite, I will be glad to look more on different sides of Telescope collaboration with Serverless functionality.

@tpmai22
Copy link
Contributor

tpmai22 commented Mar 8, 2022

@aserputov let's talk about this tomorrow

@tpmai22 tpmai22 modified the milestones: 2.8 Release, 2.9 Release Mar 11, 2022
@TueeNguyen TueeNguyen removed their assignment Mar 15, 2022
@JerryHue
Copy link
Contributor

I would move this issue to release 3.0-alpha, since @aserputov provided some feedback which can help us to implement it. I don't think it is doable for 2.9 (kind of risky to do something like this in 2 days!).

@TueeNguyen TueeNguyen removed this from the 3.0-alpha Release milestone Mar 31, 2022
@sirinoks sirinoks added the type: research Requires researching and commenting what you have found label Jul 25, 2022
@humphd
Copy link
Contributor Author

humphd commented Oct 5, 2022

https://github.com/dijonmusters/supabase-data-at-the-edge is a fascinating use case for Supabase + CloudFlare workers + K/V Storage.

@humphd humphd changed the title See if we can use CloudFlare Experiment with alternative CloudFlare deployment Nov 2, 2022
@humphd
Copy link
Contributor Author

humphd commented Nov 2, 2022

I've read a few posts recently that have reminded me of this issue, and I would love to see us experiment with building an alternative, edge deployment using CloudFlare:

Doing so should allow us to slim down what we actually host on our own servers, and move a bunch of things to the cloud.

CloudFlare is also nice because unlike Vercel, building teams to work on something together isn't hard.

@humphd
Copy link
Contributor Author

humphd commented Jan 20, 2023

There's a bunch of stuff we could do with CloudFlare, but we haven't come-up with actionable use cases. Let's re-open if/when we do.

@humphd humphd closed this as completed Jan 20, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: deployment Production or Staging deployment area: performance Issues related to our performance type: enhancement New feature or request type: nice to have Feature that'd be nice to have, but not a priority type: research Requires researching and commenting what you have found
Projects
None yet
Development

No branches or pull requests

10 participants