Softwr

Cloud · head to head

Amazon S3 vs PgBouncer

Amazon S3 logo

Amazon S3

Cloud

Amazon Web Services' pay-as-you-go object storage service

From
On request
Free plan
No
PgBouncer logo

PgBouncer

Databases

Lightweight open-source connection pooler for PostgreSQL

From
Free
Free plan
Yes

The short version

  • PgBouncer is an open-source connection pooler.
  • PgBouncer is free; Amazon S3 prices on request.
  • Only Amazon S3 lists object storage in buckets; only PgBouncer lists session pooling.
  • Where Amazon S3 falls short: billing depends on storage class, requests and transfer, so total cost is hard to predict.
  • Where PgBouncer falls short: works with PostgreSQL only; it cannot pool connections for other database engines.

How do Amazon S3 and PgBouncer differ?

Amazon S3 and PgBouncer differ on starting price (On request against Free), pricing model (Usage-based against Open-source) and free tier (No against Yes). Only the attributes on which Amazon S3 and PgBouncer actually diverge.

Attributes where Amazon S3 and PgBouncer differ
AttributeAmazon S3PgBouncer
Starting priceOn requestFree
Pricing modelUsage-basedOpen-source
Free tierNoYes
PlatformsWebLinux, macOS, Windows
CategoryCloudDatabases

Which features does each one have?

They share no listed features; 9 appear only for Amazon S3 and 9 only for PgBouncer. Drawn from each product's published feature list. An absence here means we hold no record of it - not that the product lacks it.

Only in Amazon S3

  • Object storage in buckets
  • Multiple storage classes including Glacier
  • S3 Intelligent-Tiering
  • Versioning
  • Replication
  • Encryption by default
  • Static website hosting
  • Time-limited authenticated URLs

Only in PgBouncer

  • Session pooling
  • Transaction pooling
  • Statement pooling
  • Low memory use per connection
  • Online reconfiguration of most settings
  • Online restart and upgrade without dropping clients
  • Backends on different hosts
  • TLS support via OpenSSL

What is each one used for?

Amazon S3 is most often brought in for data lake storage for analytics; PgBouncer for reducing open connections to a busy PostgreSQL server. The jobs each tool is most often brought in to do.

Amazon S3

  • Data lake storage for analyticsnot PgBouncer
  • Application and mobile app file storagenot PgBouncer
  • Long-term archives in Glacier classesnot PgBouncer
  • Static website hostingnot PgBouncer

PgBouncer

  • Reducing open connections to a busy PostgreSQL servernot Amazon S3
  • Pooling connections from serverless or short-lived application processesnot Amazon S3
  • Fronting databases spread across several hostsnot Amazon S3
  • Rolling upgrades without dropping client connectionsnot Amazon S3

Where do Amazon S3 and PgBouncer fall short?

Amazon S3's most cited limit: billing depends on storage class, requests and transfer, so total cost is hard to predict. PgBouncer's: works with PostgreSQL only; it cannot pool connections for other database engines. Documented limitations, not opinions. Every one is a constraint you would hit in normal use.

Amazon S3

  • Billing depends on storage class, requests and transfer, so total cost is hard to predict
  • Outbound internet data transfer is charged beyond the first 100 GB per month
  • Objects larger than 5 GB need multipart upload because single uploads are capped at 5 GB
  • Versioning is disabled by default and must be switched on per bucket
  • Available only on AWS; moving data elsewhere means egress and re-integration work

PgBouncer

  • Works with PostgreSQL only; it cannot pool connections for other database engines
  • Transaction pooling disables session features such as LISTEN, SET/RESET and session-level advisory locks
  • Windows support is limited to MinGW builds; Cygwin and Visual toolchains are not supported
  • Configured through files and an admin console, with no built-in graphical interface
  • Does not provide failover, replication management or read-replica load balancing

How much do Amazon S3 and PgBouncer cost?

PgBouncer is free to use. Plan by plan below, from each vendor's own pricing page.

Amazon S3

On request

No published plan breakdown. See the Amazon S3 review.

PgBouncer

Free

No published plan breakdown. See the PgBouncer review.

Which should you pick?

Choose Amazon S3 if

  • You need object storage in buckets.
  • You also want multiple storage classes including glacier.

Choose PgBouncer if

  • You need session pooling.
  • You want to start without paying.
  • You work on Linux, macOS, Windows.
  • You also want transaction pooling.

Questions people ask

Is Amazon S3 or PgBouncer better?
It depends on the job. Amazon S3 fits data lake storage for analytics; PgBouncer fits reducing open connections to a busy PostgreSQL server. Amazon S3 starts at On request and PgBouncer at Free.
Which is cheaper, Amazon S3 or PgBouncer?
PgBouncer has a free tier; the other does not. Paid plans start at On request for Amazon S3 and Free for PgBouncer.
Does Amazon S3 or PgBouncer run on more platforms?
Amazon S3 runs on Web. PgBouncer runs on Linux, macOS, Windows.
Can I use PgBouncer for free?
Yes. PgBouncer has a free tier, so you can try it without paying. Amazon S3 starts at On request.
What is Amazon S3 best used for?
Amazon S3 is most often used for data lake storage for analytics, application and mobile app file storage, long-term archives in glacier classes, static website hosting. Of those, data lake storage for analytics and application and mobile app file storage are not what PgBouncer is typically brought in for.
What can Amazon S3 do that PgBouncer cannot?
Amazon S3 covers Object storage in buckets, Multiple storage classes including Glacier, S3 Intelligent-Tiering, Versioning. PgBouncer covers Session pooling, Transaction pooling, Statement pooling, Low memory use per connection.

Answered from the vendors’ own pages

Amazon S3: What is Amazon S3?

Amazon S3 is an object storage service from AWS, described as built to retrieve any amount of data from anywhere. It is used for data lakes, cloud-native applications and mobile apps.

Source
PgBouncer: What is PgBouncer used for?

PgBouncer is a lightweight connection pooler for PostgreSQL. It lets many client connections share fewer server connections, which lowers the load of holding many connections open.

Source
Amazon S3: How is S3 priced?

AWS says the cost depends on object size, storage duration and storage class, with no minimum charge. Inbound transfer from the internet is free, as are transfers between buckets in the same Region, and the first 100 GB per month out to the internet is free.

Source
PgBouncer: What pooling modes does PgBouncer support?

It supports session, transaction and statement pooling. Session pooling supports all PostgreSQL features, while transaction and statement pooling restrict some session-based features.

Source
Amazon S3: What is the maximum object size in S3?

Objects can be up to 5 TB. A single upload operation is capped at 5 GB, so larger objects use the multipart upload API.

Source
PgBouncer: Does PgBouncer run on Windows?

The project's build instructions support Windows only through MinGW. It states that Cygwin and Visual toolchains are not supported, and that LDAP is not supported on Windows.

Source
Amazon S3: Is S3 versioning on by default?

No. Versioning is available but disabled by default. Default bucket-level encryption was added in November 2017.

Source
PgBouncer: What do I need to build PgBouncer from source?

The README lists a C11-capable compiler, Libevent 2.0 or newer, pkg-config and, for TLS, OpenSSL 1.0.1 or newer. Optional components include c-ares, LDAP libraries and PAM libraries.

Source
Share

Related pages

Other head to heads