Presentator v3 release and some real numbers regarding its PocketBase server setup #4254
Replies: 6 comments 4 replies
-
Can we know how many concurrent users Presentator v3 gets? |
Beta Was this translation helpful? Give feedback.
-
Thanks for the interesting insides. For an alternative backupstorage just wanted to point you to https://www.hetzner.com/storage/storage-box/ |
Beta Was this translation helpful? Give feedback.
-
Great job!! 👏👏 |
Beta Was this translation helpful? Give feedback.
-
This is so encouraging. Thank you for sharing. Have an awesome break. |
Beta Was this translation helpful? Give feedback.
-
@ganigeorgiev are you hosting the sveltekit on the same server? Or these stats are only for pocketbase? I'm wondering if I can host both on a cax11 and not worry about performance for a while until it's time to scale |
Beta Was this translation helpful? Give feedback.
-
Thank you for your sharing I am building a SaaS using Nextjs & Pocketbase and I was wondering about the performance in the production environment I hope you well and keep the good job 👍 |
Beta Was this translation helpful? Give feedback.
-
Earlier today I've released Presentator v3 (based on PocketBase) and I mentioned in the past discussions that will share some numbers, so here there are.
Server setup
The application is currently hosted on the smallest Hetzner CAX11 instance (2vCPU Ampere/ARM64; 4GB RAM; 40GB disk space) and has an additional 210GB block storage volume mounted only for the uploaded files (
pb_data/storage
).The total monthly cost would be ~€15: €4.55 for the server and €11.09 for the extra block storage (the prices are with 20% VAT so for your location may slightly vary; you can check your current detected location VAT rate from the header in the Hetzner website).
Running for couple hours it seems to work fine so far without any noticible performance degradation (in the worst case scenario I'll just rescale it from the Hetzner dashboard, but I doubt that it will be needed).
App details and numbers
The current Presentator v3 data is organized in 10 collections with various schema sizes and fields.
At the time or writing, the total number of records across all collections is ~573K.
The largest collection has a little over 260k records.
The "users" are ~17k but I have no idea how much of those accounts are actually in use.
The database file (
pb_data/data.db
) currently is ~130MB.The uploaded files (
pb_data/storage
) are total of ~165GB.Note that this DB data and storage size is the accumulated amount over 6-7 years (the first Presentator beta release was around 2015/2016 and for some time it was a private/invite only until open sourced and available for everyone couple months later).
Backups
For backups, I use an old spinning drive (500GB) connected via usb to my laptop that runs a bash script twice a day and once every Sunday.
I'm not sure if it would be useful but below is a simplified version of my backup script:
backup.sh
Basically it generates a backup of the SQLite db file and then calls
rsync
to incrementally sync the changes to my local usb disk directory (note that we don't use the builtin PocketBase backup zip functionality because it creates a full archive of thepb_data
and this will be very slow, even without compression, for 165GB+ many small files).Custom backend code
Since we already had a lot of things builtin in PocketBase, there wasn't really that much extra backend code needed for Presentator.
You can check the repo if you are curious - https://github.com/presentator/presentator.
The custom backend functionality is mostly related to the app specific notifications and comments handling and most of the Go code in the repo is actually integration tests for the web APIs and collection rules. Everything else is frontend.
What next
As most of you probably know, I started PocketBase because of Presentator, but that doesn't mean that its development will stall.
Quite the contrary actually. Now that most of the Presentator related work is pushed out of the way, I will be able to dedicate and focus most of my time on improving and fixing the PocketBase API warts.
And there are a lot of things that I want to change.
The current web APIs and exposed Go/JS interfaces are workable, but far from perfect.
There are a lot of ambiguities and caveats to the framework usage (especially related to the files upload handling) that can be done a lot better and simpler.
In other words, I want to make PocketBase a better, simpler and more extendable Go framework.
I'll take a short break the next couple days to eventually fix whatever show up related to the Presentator v3 release, but after that I'm planning to start designing and experimenting with a slightly different PocketBase internal structure. There will be more details about the planned changes once I test couple different ideas, but in general I'm planning to work towards making the SQLite dev experience more "native" (ex. loading a raw SQLite db without manually mapping to the PocketBase fields), allow custom user defined collection fields (initially only the Go code portion, the UI will be as final stage), simplify the models abstraction and make everything
Record
, eventually remove/refactor the form models to avoid having 2 different ways of persisting data, and many more. And again, I don't want to make promises and there are no fixed ETAs so please be understanding.Beta Was this translation helpful? Give feedback.
All reactions