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

    AA

    05/27/2023, 9:07 PM
    oh, boo, there goes my entire strategy
  • e

    Erisa | Support Engineer

    05/27/2023, 9:08 PM
    keep in mind it will log every request from the workers, not just the ones that would have been blocked
  • a

    AA

    05/27/2023, 9:08 PM
    I have some local code i thought i'd move to workers now that they support postgresql.. but.. tunnels dont support postgresql 😛
  • d

    dave

    05/27/2023, 9:08 PM
    if I disable it, will it log the blocked ones? (I assumed not.)
  • e

    Erisa | Support Engineer

    05/27/2023, 9:09 PM
    All blocked requests are logged
  • c

    Chaika

    05/27/2023, 9:09 PM
    fwiw it might make more sense to use something like an http api (I believe postgres has an extension for it directly) anyway, as spinning up new connections is expensive, and you'd want some sort of connection pooling. Implementing that yourself with DOs is kind of messy
  • e

    Erisa | Support Engineer

    05/27/2023, 9:10 PM
    solutions like PostgREST make this a piece of cake
  • c

    Chaika

    05/27/2023, 9:10 PM
    If it got blocked, it didn't get skipped by the rule
  • d

    dave

    05/27/2023, 9:10 PM
    every request from the Workers that target my own zone, right?
  • a

    AA

    05/27/2023, 9:10 PM
    yea already got the API, the idea was to move the http api to cloudflare. thought it'd be a nice step into migrating to workers
  • e

    Erisa | Support Engineer

    05/27/2023, 9:10 PM
    yes indeed, anything that matches the rule criteria
  • d

    dave

    05/27/2023, 9:10 PM
    ah cool, I don't think I do that many self-referencing fetches
  • e

    Erisa | Support Engineer

    05/27/2023, 9:11 PM
    feel free to log then, might be fun to see
  • d

    dave

    05/27/2023, 9:11 PM
    enabled
  • e

    Erisa | Support Engineer

    05/27/2023, 9:12 PM
    my security events is a mess without filtering out all the skip logs

    https://cdn.discordapp.com/attachments/909458221419356210/1112126114450640916/image.pngâ–¾

  • d

    dave

    05/27/2023, 9:12 PM
    I already have over 1,400,000 logpush objects
  • d

    dave

    05/27/2023, 9:12 PM
    31.3k firewall logpush objects
  • d

    dave

    05/27/2023, 9:12 PM
    Workers are by far the worst "offender" (but I like it 😄 ) for logpush.
  • a

    AA

    05/27/2023, 9:13 PM
    yea i was thinking a DO.. basically following this high level.. but i guess they assume the database is exposed to the internet. https://developers.cloudflare.com/workers/databases/connect-to-postgres/
  • c

    Chaika

    05/27/2023, 9:13 PM
    Logpush is awesome, so useful
  • e

    Erisa | Support Engineer

    05/27/2023, 9:13 PM
    my workers logs go to Sumo Logic which is fun because i can then search them for errors and it will actually tell me why the errors happened (within the best of its abilities)
  • c

    Chaika

    05/27/2023, 9:14 PM
    looks like it. In that blog itself they recommend using something like Pgbouncer. There was an old abandoned modified postgres driver to use tcp websockets/cf access, but I wouldn't recommend it
  • d

    dave

    05/27/2023, 9:14 PM
    yeah 0 hits so far
  • a

    AA

    05/27/2023, 9:14 PM
    @Chaika yea i looked at the code of that. it was kinda odd 😄
  • d

    dave

    05/27/2023, 9:14 PM
    now I'm confused why I thought this was a problem I needed to fix?
  • c

    Chaika

    05/27/2023, 9:15 PM
    something fun I've noticed with logpush is that even with frequency low, workers trace events are batched/pushed in way smaller amounts
  • d

    dave

    05/27/2023, 9:15 PM
    yeah the HTTP logpush files are much bigger, with fewer objects
  • c

    Chaika

    05/27/2023, 9:16 PM

    https://cdn.discordapp.com/attachments/909458221419356210/1112127146551419081/image.pngâ–¾

  • a

    AA

    05/27/2023, 9:16 PM
    hmm, this doesnt seem like it would work either.. unless the worker had a tunnel.. https://blog.cloudflare.com/cloudflare-tunnel-for-postgres/
  • c

    Chaika

    05/27/2023, 9:16 PM
    DNS gets more raw data I assume, but also just seems to batch more / more infrequent
1...42634264426542664267Latest