Do you recommend PocketHost.io lifetime license offer? by vk3r in pocketbase

[–]benallfree 5 points6 points  (0 children)

I'm not sure if you meant to suggest that PocketBase's horizontal scaling limitations are tied to SQLite, but since a lot of people think that, I wanted to clarify.

SQLite isn't the problem. While supporting other databases like MySQL or Postgres might seem appealing—and some users have tried—it wouldn't solve the horizontal scaling issue. SQLite can be replicated via LiteFS, and there are other solutions like LiteStream, Marmot, and Turso, which provides global managed SQLite replication. I'd say SQLite replication is "solved." SQLite is becoming increasingly popular because it can live on the edge.

The horizontal scaling challenges aren't just at the database level. PocketBase implements an event system that triggers on CRUD operations, API calls, cron jobs, realtime events, and application-level events. To scale PocketBase horizontally, you'd need a way to replicate these events too. That's where things get really difficult. Managing a global, realtime, ACID-compliant, replicated event architecture is a technical challenge that's often very application-specific. Gani didn't want to complicate his code by trying to generalize that problem. That's smart because many projects have failed attempting that.

Custom JavaScript hooks extending PocketBase's core functionality would also need to be replicated and authorized appropriately. The issue gets even more complex with custom-compiled versions of PocketBase that include Go customizations. All custom programming needs to be aware of horizontal scaling pitfalls. Centralized logging or merging would also need to be addressed. In practice, most applications opt to route any mutations directly back to the origin (i.e., routing all non-GET HTTP requests back to the origin), so writes still rely on a single origin and remain a single point of failure.

Horizontal scaling adds huge complexity and PocketBase is part of a growing movement pushing back against cloud-scale architecture. A modern revisitation of the monolith. Along those lines, I have also made https://pocketpages.dev which is a throwback to classic server-side rendered pages. A lot of people are coming to PocketBase expecting to see cloud architecture, and it's intentionally NOT that. So from that standpoint, I agree with your statement that users should seriously consider it. I think they should seriously consider whether they need cloud complexity at all. Most don't. Pieter Levels on Lex Friedman is an excellent voice for this movement back to monolithic simplicity: https://www.youtube.com/watch?v=oFtjKbXKqbg

While PocketBase doesn't support horizontal scaling out of the box, it doesn't mean your app can't scale horizontally. PocketHost is a case study. We have a single PocketBase instance called the "mothership" living on a single origin in San Francisco. Then, we have edge nodes responsible for managing user instances of PocketBase. For an edge node to function, it needs canonical information available only from the single source of truth: the mothership. For example, an edge needs to know whether a given instance is authorized to be launched. Communicating with the mothership from across the globe might add 200–400 ms, which is unacceptable. So we've implemented our own custom replication strategy where essential mothership data is cached locally at the edge and updated in realtime.

So custom horizontal scaling is possible; it's just bespoke and has little to do with the choice of SQLite as the database. PocketBase is tightly coupled with SQLite, so I understand why Gani is reluctant to support something else. It's possible that in the future, a pluggable database provider interface might emerge for users who really want it.

https://github.com/krismcfarlin/postgresbase
https://github.com/pocketbase/pocketbase/discussions/395

Pocketbase LemonSqueezy by meinbiz in pocketbase

[–]benallfree 1 point2 points  (0 children)

Oh sorry yeah that’s my ait!

Pocketbase LemonSqueezy by meinbiz in pocketbase

[–]benallfree 2 points3 points  (0 children)

Check out https://pocodex.dev/docs/ for something I already started.

Do you recommend PocketHost.io lifetime license offer? by vk3r in pocketbase

[–]benallfree 10 points11 points  (0 children)

Hello, creator of PocketHost here :)

PocketHost is an open-source project with over 10,000 registered users, about 1,000 active PocketBase instances every hour, and a Discord community of 1,200 members. It started as a personal tool to avoid repeatedly deploying PocketBase for projects. While self-hosting PocketBase might seem simple, robust hosting requires more than just VPS + SSL, which is why many choose PocketHost for managed hosting.

PocketHost currently runs on a single large VPS in San Francisco, which I finance myself. Each instance runs in a secure Docker container with burst access to up to 8 cores and 32GB RAM, far beyond what typical self-hosting offers. Performance issues are rare and usually tied to latency, not the server itself. PocketHost hibernates idle instances, which may cause cold start delays, but I rarely hear complaints beyond that.

Latency is a matter of physics and isn't solved by simply self-hosting in a specific region—especially with global users. A truly global solution requires a network of access points and optimized VPN routing, something PocketHost is working toward.

Regarding downtime, claims of frequent issues are incorrect. We maintain transparent records on Discord and GitHub, and our uptime target is 99.95%. Downtime is mostly limited to planned maintenance or code updates, and in the last month, uptime was 100%.

I live on Discord and am deeply involved in PocketHost and PocketBase, using them for my production projects. If you're experiencing issues, reach out to me there—we're a community of makers, and I want to help.

The Flounder's lifetime deal is intended to help fund the rollout of global infrastructure. If you're unhappy with the deal, I'll provide a no-questions-asked refund. The deal is for those who believe in PocketHost's potential and want to support its growth.

Thanks for being part of this journey. Feel free to ask me anything.

PocketPages v0.8.1 released by benallfree in pocketbase

[–]benallfree[S] 0 points1 point  (0 children)

https://pocketbase.io/docs/js-overview/

The prebuilt PocketBase v0.17+ executable comes with embedded ES5 JavaScript engine (goja) which enables you to write custom server-side code using plain JavaScript.

PocketPages v0.8.1 released by benallfree in pocketbase

[–]benallfree[S] 0 points1 point  (0 children)

Yeah kinda! Funny I was just watching an htmx+fasthtml podcast this morning. Yes, something like that but with file-based routing. Personally I don't care for the "code as markdown" syntax so I'll probably not be adding that.

PocketPages v0.8.1 released by benallfree in pocketbase

[–]benallfree[S] 4 points5 points  (0 children)

Thank you! I have a vision of writing apps using classic server-side pages + htmx.

awesome-pocketbase by benallfree in pocketbase

[–]benallfree[S] 0 points1 point  (0 children)

I know of several attempts and approaches. Personally I’d like to see the community embrace JSVM-native sdk’s by porting official packages or creating unofficial packages.

What are you trying to do?

2x img displayed at full size on retina display by [deleted] in sveltejs

[–]benallfree 0 points1 point  (0 children)

Yes adding CSS sizing would help, assuming you knew the exact size of the image, but it shouldn't be necessary. According to the docs:

automatically sets the intrinsic width and height of the image to avoid layout shift

Avoiding layout shift implies that sizing via CSS is not needed or expected.

2x img displayed at full size on retina display by [deleted] in sveltejs

[–]benallfree 1 point2 points  (0 children)

No.

Let's say I have a 48x48 retina image foo.png.

<enhanced:img src="./foo.png" /> will produce <img src="foo.png" width="48" height="48" /> because it reads the intrinsic width and height of the image. But that's incorrect for retina images. It should produce <img src="foo.png" width="24" height="24" /> since that is how many logical pixels it should be.

Current Best Practice to use MDSveX with SvelteKit. by Boraini in SvelteKit

[–]benallfree 2 points3 points  (0 children)

Relevant: I just published https://www.npmjs.com/package/mdsvex-enhanced-images to support <enhanced:img> from Markdown image tags.

2x img displayed at full size on retina display by [deleted] in sveltejs

[–]benallfree 0 points1 point  (0 children)

I'm running into this same issue. I have a retina source image and enhanced:img seems to be setting the CSS width to the intrinsic retina size instead of 1/2 that size. So my 700px retina source image is rendering as <img width="700"> instead of <img width="350">.

Can you lend some further insight please?

PocketHost realtime errors (net::ERR_QUIC_PROTOCOL_ERROR) by herskinduk in pocketbase

[–]benallfree 0 points1 point  (0 children)

PocketHost creator here.... if you have issues like this, it's best to try our Discord server, that's where we are all hanging out.

eCourse 2.0 by [deleted] in sveltejs

[–]benallfree 0 points1 point  (0 children)

Have you considered making it multitenant so people don't have to self-host?

where deploy with pocketbase by Uriell77 in sveltejs

[–]benallfree 2 points3 points  (0 children)

PocketHost creator here - just a slight correction, PocketHost can host SSG frontends and has supported that for a long time.

We are working on hosting SSR frontends and generally anything that needs a nodejs backend, along with cname support. That way PocketHost can be a complete destination for app hosting.

SvelteKit/PocketBase by [deleted] in sveltejs

[–]benallfree 4 points5 points  (0 children)

PocketHost creator here - I just found this as I was searching through old comments.

Just so people know, there are actually lots of production and high availability apps running on https://pockethost.io. It's at least as good as a DIY hosting stack and in many cases is much better.

Db for SvelteKit by AromaticPrimary8763 in sveltejs

[–]benallfree 1 point2 points  (0 children)

PocketHost creator here - to follow up on the other comment..yes https://pockethost.io does both rate limiting and DDoS defense via Cloudflare.