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

    sathoro

    05/14/2023, 7:51 PM
    yeah it can be, is almost entirely open source
  • a

    AA

    05/14/2023, 7:52 PM
    i wish it'd been more mature when i started this project ;P
  • s

    sathoro

    05/14/2023, 7:52 PM
    we use it for auth and CRUD stuff
  • s

    sathoro

    05/14/2023, 7:52 PM
    ha yeah stuff is moving fast the last couple years
  • a

    AA

    05/14/2023, 7:52 PM
    this projects from 2018.. still chugging.
  • a

    AA

    05/14/2023, 7:53 PM
    predates workers i believe
  • s

    sathoro

    05/14/2023, 7:56 PM
    it is a good time to start a project now
  • s

    sathoro

    05/14/2023, 7:56 PM
    DOs and workers have been a literal game changer
  • a

    AA

    05/14/2023, 7:56 PM
    'soon' is always a good time to start a project 😛
  • t

    Tom Sherman

    05/14/2023, 8:19 PM
    How? Don't think you'd be able to run that on a worker
  • t

    Tom Sherman

    05/14/2023, 8:20 PM
    I imagine there will be some DO connection pool libraries that will be created
  • t

    Tom Sherman

    05/14/2023, 8:20 PM
    "just setup a connection pooler" is easier said than done with workers
  • t

    Tom Sherman

    05/14/2023, 8:20 PM
    An unexplored frontier lol
  • s

    sathoro

    05/14/2023, 8:22 PM
    I meant once the TCP comes out. In meantime use Supabase or PostgREST
  • t

    Tom Sherman

    05/14/2023, 8:22 PM
    TCP support alone doesn't solve it
  • t

    Tom Sherman

    05/14/2023, 8:22 PM
    Because of the way workers scale
  • s

    sathoro

    05/14/2023, 8:22 PM
    why
  • s

    sathoro

    05/14/2023, 8:23 PM
    pgbouncer will queue the connections
  • s

    sathoro

    05/14/2023, 8:23 PM
    that is half the point of using it
  • t

    Tom Sherman

    05/14/2023, 8:23 PM
    How/where are you deploying pgbouncer? I've never used it tbf so maybe I'm misinformed
  • t

    Tom Sherman

    05/14/2023, 8:23 PM
    But don't think you'll be able to deploy it on a worker
  • s

    sathoro

    05/14/2023, 8:23 PM
    also workers stick around for a while you could cache the requests locally I think. but establishing a connection to pgbouncer doesn't take that long
  • s

    sathoro

    05/14/2023, 8:24 PM
    I'm not saying you would run it in a worker
  • s

    sathoro

    05/14/2023, 8:24 PM
    you run it on a server close to the database
  • s

    sathoro

    05/14/2023, 8:24 PM
    and connect to it from the worker
  • s

    sathoro

    05/14/2023, 8:24 PM
    running it in a worker would make no sense lol
  • t

    Tom Sherman

    05/14/2023, 8:24 PM
    It would make sense to run the pool on a durable object
  • s

    sathoro

    05/14/2023, 8:24 PM
    now we are just going in a circle lol
  • s

    sathoro

    05/14/2023, 8:25 PM
    already have this exact convo above: https://discord.com/channels/595317990191398933/779390076219686943/1107391755231445052
  • t

    Tom Sherman

    05/14/2023, 8:25 PM
    When people see "connect to pg from a worker" I don't think they automatically think "oh sure let me go and spin up a persistent server with a pool on"
1...246024612462...2509Latest