1. Probably direct, because Hyperdrive will handle global routing for you and using the `Optimized H

  1. Probably direct, because Hyperdrive will handle global routing for you and using the
    Optimized Host
    will likely just add a layer of complexity since they'll be trying to also handle global routing.
  2. It does test connection settings, yes.
  3. You probably don't need a pool because Hyperdrive does pooling for you, so the
    createConnection
    is correct. Note that because of the way Hyperdrive works, it's safe and recommended to create a new connection on every request (and terminate the connection after each request using
    ctx.waitUntil
    ).
  4. 5 connections is the maximum, anything after that can result in deadlocking the Worker (not sure if the
    createConnection
    even has a
    connectionLimit
    param because it's not pooling anyway...)
Was this page helpful?