| From: | Steve Atkins <steve(at)blighty(dot)com> |
|---|---|
| To: | pgsql-general(at)lists(dot)postgresql(dot)org |
| Subject: | Re: Using unlogged tables for web sessions |
| Date: | 2020-04-17 08:13:08 |
| Message-ID: | 856f24eb-91e5-94ef-4a32-cb57302275db@blighty.com |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-general |
On 16/04/2020 19:39, Stephen Carboni wrote:
> Hello.
>
> I was wondering if anyone was using unlogged tables for website
> sessions in production. I'm interested if it breaks the prevailing
> opinion that you don't put sessions in PG.
I generally put sessions in postgresql, with regular tables, when I'm
using persistent server-side sessions, rather than just stashing all the
user data in a signed cookie or local storage.
It ... works fine? It drastically simplifies app deployment to have a
single point of persistent storage, and having one that you can easily
interrogate by hand simplifies development and debugging. Reads are a
single indexed query, writes are typically HOT, so the IO and overhead
aren't drastically different from any other persistent store.
A lot of webapp development advice is based on "Ah, but how will you
scale it up to Facebook levels of traffic?" and then skipping over the
answer "Um, I won't ever need to. And if I did I'd have enough revenue
to hire someone very, very good to rearchitect my session storage.".
Cheers,
Steve
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Kiwoong Choi | 2020-04-17 08:13:38 | Is there a script and sample data to test the performance of postgresql? |
| Previous Message | Paul Förster | 2020-04-17 07:02:26 | Re: Could not resolve host name error in psycopg2 |