https://discord.cloudflare.com logo
Join Discord
Powered by
# workers-discussions
  • n

    Nascode

    01/22/2021, 10:04 AM
    Anyone use flareact on production? (I dont know if its correct to ask about it on this server)
  • e

    eidam | SuperSaaS

    01/22/2021, 10:15 AM
    Its Workers related, so the best place! 😄 I am using Flareact for https://status-page.eidam.dev, however its a simple single page app. Do you have something specific on mind?
  • n

    Nascode

    01/22/2021, 10:41 AM
    Very nice! Sometimes i built landing page for clients, look like flareact might be a good fit for future project. Thera are many pros already for my use case. Please correct me if i am wrong but the cons will be: 1. Static files limit is 1MB (kv key limit) 2. No simple replacement for next/image (auto optimize image size) Still experimenting with it.
  • p

    Peps

    01/22/2021, 10:44 AM
    the current KV value limit is 25MB iirc
  • p

    Peps

    01/22/2021, 10:44 AM
  • n

    Nascode

    01/22/2021, 10:45 AM
    Ah my mistake. Thats very generous
  • e

    eidam | SuperSaaS

    01/22/2021, 11:55 AM
    And yep, no auto image optimisation unfortunately
  • g

    Greg Brimble | Cloudflare Pages

    01/22/2021, 12:04 PM
    @User , can I DM you to chat about image optimization?
  • n

    Nascode

    01/22/2021, 12:06 PM
    sure @User
  • i

    itsmatteomanf

    01/22/2021, 12:44 PM
    You could use Cloudflare’s Image Optimization or Cloudflare Image Resizing if you are on Biz or higher.
  • e

    eidam | SuperSaaS

    01/22/2021, 12:44 PM
    Yep, I am not for my personal projects, however we briefly discussed it with @User and he pointed out that
    next/image
    can actually be included/used in Flareact just as other npm modules
  • g

    Greg Brimble | Cloudflare Pages

    01/22/2021, 12:45 PM
    Still needs testing. But
    next/image
    does support custom loaders, so I'm writing one for Cloudflare Image Resizing right now.
  • i

    itsmatteomanf

    01/22/2021, 12:47 PM
    That would be so cool.
  • d

    Declan

    01/22/2021, 12:48 PM
    Hi, I have a case where my workers are stochastically timing out on a simple jwt verify routine.. can you offer any insight into why a specific worker could sometimes exceed the time limit
  • g

    Greg Brimble | Cloudflare Pages

    01/22/2021, 12:48 PM
    Yeah, there's already loaders for Imgix, Akamai and Cloudinary, so it makes sense to add.
  • i

    itsmatteomanf

    01/22/2021, 12:53 PM
    Yeah, for sure. Note, though. The loader must be within the Worker itself, not using the path because when Workers run, especially if the file is served by the Worker they'll fail.
  • g

    Greg Brimble | Cloudflare Pages

    01/22/2021, 12:54 PM
    I'm just adding the loader to
    next/image
    right now, which'll just do URL re-writing.
  • a

    adaptive

    01/22/2021, 12:55 PM
    I use imgix and then store the optimized on the fly (with format variations) on KV indefinitely.
  • g

    Greg Brimble | Cloudflare Pages

    01/22/2021, 12:55 PM
    I spent all summer doing image optimization stuff with Workers though, so perhaps we can write a Worker or Flareact component which specifically leverages all the magic available to Workers (e.g. request Client Hints and the Cloudflare Cache)
  • g

    Greg Brimble | Cloudflare Pages

    01/22/2021, 12:55 PM
    KV rather than Cache? Any particular reason?
  • a

    adaptive

    01/22/2021, 12:56 PM
    with no loaders, just my manipulation
  • a

    adaptive

    01/22/2021, 12:56 PM
    S3 Provider > Imgix > KV > Cache
  • a

    adaptive

    01/22/2021, 12:57 PM
    I do use cache, but it can be evicted for many reasons
  • g

    Greg Brimble | Cloudflare Pages

    01/22/2021, 12:57 PM
    More performant than KV though, no?
  • g

    Greg Brimble | Cloudflare Pages

    01/22/2021, 12:58 PM
    (Assuming cache hit)
  • a

    adaptive

    01/22/2021, 1:00 PM
    Yes, but the way I built it, I load 100,000 master images (50 Mb PNG ) on the S3 provider, then as user visits and bots crawl those images are optimized on-demand, optimization goes to cache and KV.
  • a

    adaptive

    01/22/2021, 1:01 PM
    No need to re-optimize, only in case of a new format.
  • g

    Greg Brimble | Cloudflare Pages

    01/22/2021, 1:03 PM
    Ah, fair! I was just curious 🙂
  • a

    adaptive

    01/22/2021, 1:06 PM
    As cache is per colo, you still need a source of truth of the optimized, you could put in another S3 bucket, but I opted Cloudflare KV.
  • g

    Greg Brimble | Cloudflare Pages

    01/22/2021, 2:05 PM
    https://github.com/vercel/next.js/pull/21443
1...666768...2509Latest