D
Deno

help

Deno Deploy Questions

Bbombillazo9/11/2023
Hey there. We are using Supabase to run edge functions, which in turn built their feature on top of Deno Deploy. I'd like to know more about how Deno Deploy works. Our main inquiry are on topics such as how fast can these functions scale, and how do they manage request load balancing and load, where are these edges, what caching (if any) mechanisms are used, do they become "cold" after some time, how "ephemeral" are these functions in case some troubleshooting or reboot is required, etc. This comes since we've noticed some latency issues sometimes when we use our app and want to understand the root cause but searching on the guides we have no notion of how exactly are these edge functions being deployed and run and their surrounding environment. Any more in-depth info would help us greatly .
DAHDeno AI Helper9/11/2023
Hello! Deno Deploy is a next-generation cloud platform built on JavaScript isolates. It runs your JavaScript, TypeScript, and WebAssembly at the edge, in our 35 global regions, close to your users. It scales automatically, from zero to thousands of requests per second. As for the latency issues you're experiencing, it's hard to pinpoint the exact cause without more information. However, Deno Deploy is designed to minimize latency by running your code in global regions close to your users. Unfortunately, the documentation does not provide specific details on request load balancing, caching mechanisms, or the ephemerality of the functions. For more in-depth information, I would recommend reaching out to Deno's support or community forums. They might be able to provide more insights or help you troubleshoot the latency issues you're experiencing. 🦕
IioB9/11/2023
A lot of this comes from person experience, so take it with a grain of salt. 1. The functions scale pretty fast, though it's all opaque. You could sit down and test how it scales in your local region with a bit of clever code using broadcastchannels but I wouldn't worry too much about that. 2. There are no caching mechanisms built into deno deploy atm. If you want request caching, set the appropriate http caching headers and let the client handle caching. 3. Isolates spin up and down all of the time. On average isolates stay up around one minute. There are no "cold starts" (they take 0ms) in Deno Deploy as the isolate starts during the TCP/TLS handshake. What latency issues are you encountering? I'm curious to hear your experience.
Bbombillazo9/11/2023
Hey, thanks for your response! I think it happens in the first time the functions are deployed as if the dependencies are being downloaded to run the request.
IioB9/11/2023
dependencies should not be downloaded at runtime at deploy-time, your dependencies are bundled automatically
Bbombillazo9/11/2023
hmmm ok, it just feels awfully similar to when one hits an AWS Lamdba function that has been long unused and the response takes a while to reach the client, yet all subsequent responses work as expected...
IioB9/12/2023
I'm sure someone on the deploy team could advise but from my experience, even with projects with a lot of dependencies, I'm getting latencies way below 100 ms
Bbombillazo9/12/2023
I am doing queries to a DB, perhaps it is due to that tbh....
IioB9/12/2023
Interesting, depending on the queries that could be relevant
AAttacler/Bart9/12/2023
both the query could be important + distance to the DB + if there is a connection already with the DB
Ccknight9/12/2023
Which DB? I've seen DynamoDB exhibit cold start like connection times the first time it was used in an isolate for example
Bbombillazo9/12/2023
We're using PostgreSQL via Supabase
Jjcs2249/13/2023
I use CockroachDB Serverless with Deno Deploy. Anecdotally, responses are snappy with my Deploy projects that don't use any backend DB. On my app backed by CockroachDB Serverless, there is latency on the first request, then they are quick thereafter. I don't want to state that's the problem you're having, just my experience.
Ccknight9/13/2023
Is that an http connection to your cockroach DB?
Bbombillazo9/13/2023
Hey, its an HTTP connection to postgres, yeah

Looking for more? Join the community!

Recommended Posts
Bunle OAK static assets to the compiled binaryHi, I am currently switching from NodeJS to Deno, and so far so good! One of the reasons for this sThe requested module does not provide an export named 'default'I'm trying to export the following interface: ```import User from '../models/User.ts'; export defaI want to contribute to deno without disturbing my libs in linux . Is there a way?**Noob alert** I have been trying to contribute to deno . So i followed these instructions https://dTimezones in Dates?Hi everyone, what's the right way to create a `Date` with a specific timezone?Resolving Class constructor errorHello, I am currently trying to port a small test api from NodeJS to Deno. This code uses only NPM pKV list is returning an empty iterator, but data is there and gettable via getHello. To simplify things, I am setting a key of `["accounts", account.name]` but when I try to get Read permission & NPM importsHello, I'm using `--allow-read=.` to allow a script to read files in the current directory. The scriWebSocket connections killing setInterval()Hey Deno friends, it appears that websocket connections are somehow stopping the execution of setIntjsx in jsAll of my files containing JSX are in `.js` files. Is there an easy fix for this when running?http errorI need help because I have a service that has more than 1 million requests per day and for about 7 ddoes Deno vscode support nesting `deno.json`?There is a project I'm working on has nesting `deno.json` files. The parent `deno.json` is a bit outDeploy says Worker not defined for ESBuild (wasm.js)@Deno AI Helper I am having trouble understanding how to get the esbuilder to work on Deno Deploy, udeno_tui Label-classHello. I just started testing around with deno_tui and found the DrawObject-Class. How do i actuallyCannot read file "src/deno.json": not implemented on jsHey @Deno AI Helper ! I'm having a bit of trouble, I'm trying to use `deno.land/x/import` to use nonError running Apollo example (on latest version)Hi. When I run this example with the latest version of apollo from npm I get errors: https://deno.Example Question for the Deno AI BotHey there - this is an example question for the Deno AI bot. How would I write a regular expression Does Deno support `export type` statements?Hello, we are using Deno + TS and I am getting the following error if I try to export a type from anHow can one patch a Deno dependency?Hello, We're used to working with node and using `patch-package` to override and fix packages fairlyError running program that uses `fp-ts` from npm (`Is a directory (os error 21)`)https://github.com/Industrial/test-fp-ls/blob/main/mod.ts When I run `deno run -A mod.ts` I get: `Can't "Sign in" to deno deployHi There, I can't sign in to deno deploy. The first time I try it works, and it sets up the GitHub A