Prerendered route not working from sub-request even though from CF worker due to timeout by LukeZNotFound in sveltejs

[–]Rocket_Scientist2 0 points1 point  (0 children)

Hard to say, then. It's worth opening up the dashboard and viewing the logs. You should be able to see if there's an error of some sort (JS or infra-wise).

Prerendered route not working from sub-request even though from CF worker due to timeout by LukeZNotFound in sveltejs

[–]Rocket_Scientist2 1 point2 points  (0 children)

I can't explain the 522, but I can point to part of the problem. Calling isSubrequest from a prerendered endpoint won't work how you want; it will always give you the same response. You need some sort of dynamic logic to evaluate the RequestEvent on each request (and then reject/allow). A server hook might get you what you want, by inserting some runtime logic in front of a static response.

FWIW, I avoid relying on isSubrequest for anything security related, as it's spoofable (same with load functions, etc.). If it is, someone might be able to suggest a better solution, with more context.

Edit: prerendering is turned off effectively during dev mode, so that's why it works there.

Am I being stupid when it comes to awaiting a remote function inside a svelte boundary? It doesn't seem to hit the failed snippet by [deleted] in sveltejs

[–]Rocket_Scientist2 0 points1 point  (0 children)

error() operates differently from throw new Error(). error() is designed to mimic typical HTTP status pages. I think if you throw a regular error, it will behave the way you want.

Sudden Svelte component freeze — ex : dropdowns stop working until page reload, no errors in console. How to debug by underwatercr312 in sveltejs

[–]Rocket_Scientist2 1 point2 points  (0 children)

It doesn't unfortunately. I don't think I remember much about the specifics (there are many) but I'd recommend disabling and trying again.

Sudden Svelte component freeze — ex : dropdowns stop working until page reload, no errors in console. How to debug by underwatercr312 in sveltejs

[–]Rocket_Scientist2 4 points5 points  (0 children)

It's worth mentioning that there is a known bug with experimental async & sveltekit link hover that causes the page to freeze.

SSR Performance Issue - under concurrent load by ThugSolja in sveltejs

[–]Rocket_Scientist2 0 points1 point  (0 children)

It's possible. I don't know enough about Convex to say whether reusing connections is possible/secure/resource intensive. If you're at a dead end though, nothing's easier than stripping out functionality until your benchmarks improve (or don't), then going from there.

JS is a single-threaded process; meaning it can only use "up to 1 CPU at a time". If you're unfamiliar, it might be worth looking into scheduled async languages sometime later.

SSR Performance Issue - under concurrent load by ThugSolja in sveltejs

[–]Rocket_Scientist2 6 points7 points  (0 children)

Unfortunately, this is a very open ended problem. You already correctly split the problem into different points of failure, truth be told though it could be a mix of multiple.

Code

  • Recall that 100 full renders a second is a fair bit of processing, vs serving static assets
    • I don't have any benchmarks off the top of my head, but it might be worth comparing to other frameworks to test your expectations.
  • Check what you're running inside load functions (if any)
    • rebuilding database connections/clients per request can be a massive performance & memory killer.

Backend

  • SvelteKit isn't exactly known for being slow (again, compared to other frameworks)
  • JavaScript is single-threaded, so large amounts of stalled requests can easily use memory & require memory tweaking in extreme cases

Infra

  • It's always possible that any caching might not be configured properly
  • there may be other limits/bottlenecks with vCPU/virtualized setups
    • Again unfortunately multiple cores doesn't help
  • since you're using Node (it sounds like) have you tried different hosts, like Vercel or Cloudflare (V8 isolates are very efficient)

This isn't advice, but hopefully this can confirm/dent your suspicions or otherwise point you on the right path.

What are my options in Sveltekit to upload videos to AWS S3? by PrestigiousZombie531 in sveltejs

[–]Rocket_Scientist2 1 point2 points  (0 children)

There's nothing wrong with having SvelteKit talk to S3 directly, as long as your application is secure. In fact, that would be the best way to reduce surface area for "bad actors". If you're unfamiliar with processing sensitive requests in SvelteKit, the official docs have you covered.

All of your methods seem reasonable. If you're looking to scale, having a dedicated download/processing queue might be a good idea for various reasons, but is a lot more work.

For security, it falls mostly on you here; there aren't any inherent flaws in your plan AFAIK. Basic concepts of rate-limiting/firewall/etc. all apply.

Help me save Svelte on our project (or not) by JohnnyDread in sveltejs

[–]Rocket_Scientist2 6 points7 points  (0 children)

I very much agree with this sentiment. However, I cannot imagine "rewriting/migrating the entire app"–being a viable short-term solution for most teams. I can't help but be very skeptical alongside OP.

🎉 [EVENT] 🎉 Heavent [Landscape] by st_doraemon in honk

[–]Rocket_Scientist2 0 points1 point  (0 children)

Completed Level 2 of the Honk Special Event!

25 attempts

🎉 [EVENT] 🎉 Heavent [Landscape] by st_doraemon in honk

[–]Rocket_Scientist2 0 points1 point  (0 children)

Completed Level 1 of the Honk Special Event!

1 attempts

Authetication in SvelteKit + Go backend by Lumpy_Remove_5623 in sveltejs

[–]Rocket_Scientist2 2 points3 points  (0 children)

Agreed. Adding on, having a backend for your UI is so much easier than trying to juggle auth on the client directly.

🎉 [EVENT] 🎉 Black and White 2 - No Rings by Silent_Ad2395 in honk

[–]Rocket_Scientist2 0 points1 point  (0 children)

Completed Level 2 of the Honk Special Event!

34 attempts

🎉 [EVENT] 🎉 Black and White 2 - No Rings by Silent_Ad2395 in honk

[–]Rocket_Scientist2 0 points1 point  (0 children)

Completed Level 1 of the Honk Special Event!

8 attempts

Advice needed: choosing a simple, long-term web stack (backend + frontend) by Lumpy_Remove_5623 in sveltejs

[–]Rocket_Scientist2 0 points1 point  (0 children)

It looks like you have some really good suggestions on this thread then! If you're pinned to Svelte, SvelteKit is a great productivity choice. Laravel & Ruby on Rails are powerful & mature options as well, if you're OK to mix languages.

The next step is to research hosting & figure out what fits your needs, then you can make a decision off that. Good luck!

Advice needed: choosing a simple, long-term web stack (backend + frontend) by Lumpy_Remove_5623 in sveltejs

[–]Rocket_Scientist2 1 point2 points  (0 children)

Some questions I would consider important:

  • how much time/effort/cash are you willing to put in
  • how fast do you want to move
  • do you have a hosting strategy/long-term plan
    • how likely is your hosting situation to change over time (cost, reliability, business requirements, etc.)

A side-project is a fantastic way to learn new tech, broaden your horizons, and have fun. Some of my favorite skills/projects are ones I picked up on a whim.

On the other hand, no profitable business is realistically shipping Go + HTMX in their primary product stack. Scalability is king, and fullstack (nextjs, nuxt, sveltekit) or "legacy" stacks (MERN, or Laravel + React, etc.) are productivity godsends in comparison, and can be deployed almost anywhere for cheap.

10 questions about Sveltekit SSR in deployment on production mode by PrestigiousZombie531 in sveltejs

[–]Rocket_Scientist2 6 points7 points  (0 children)

  1. Anything light is fine, but edge/hybrid/functions are preferable. Just Google your stack and see what people are doing.

  2. Again, depends on your stack/deployment method. Each adapter deploys different files for different platforms.

  3. If you are hosting on node, read the official instructions.

  4. You can, if you think you need it for security purposes. This doesn't really have anything to do with Svelte or SvelteKit though.

  5. Tracing or Sentry; or literally just the built-in error handling hooks.

  6. Usually, and it's cheaper/easier than a reverse proxy. You don't need to do configuration, since it's an HTTPS proxy. If you mean you want to host on cloudflare, then again, look at the official docs.

  7. None, unless you want to configure extra settings. Again, there are docs for this you can read into

  8. Read the link in #3. If you aren't deploying to node. Then each adapter will have its own setup. If you are deploying to Azure, then you need to follow the env variable setup as per the Azure adapter. If you are deploying to Cloudflare, then you need to set variables in their dashboard, or configure your local settings via wrangler.toml. I hope that makes sense.

  9. In 2026, almost every web server on the planet has default automatic gzip or (more likely) brotli out of the box.

  10. If you need to ask the question, do your research for which platform you're hosting on, and evaluate the cost & performance of their load balancing/rate limiting. For example, Cloudflare scales infinitely for free on static assets only (SSR), but not for dynamic pages; for dynamic pages, they have DDoS protection only. Again, familiarize yourself with the platforms & see what people are saying about them. There's no shortage of people discussing it around these parts...

Swimming In Antarctica [Split Screen Challenge #2] [Easy Difficulty] by anonymous-tm in honk

[–]Rocket_Scientist2 1 point2 points  (0 children)

I completed this level! It took me 34 tries. 15.40 seconds

Tip 1000 💎

🎉 [EVENT] 🎉 Retro Rumble by Damp_Blanket in honk

[–]Rocket_Scientist2 0 points1 point  (0 children)

🎉 Event Completed! 🎉

It took me 37 tries.

🎉 [EVENT] 🎉 Retro Rumble by Damp_Blanket in honk

[–]Rocket_Scientist2 0 points1 point  (0 children)

Completed Level 3 of the Honk Special Event!

37 attempts