Softwr

Databases · head to head

Google Compute Engine vs PgBouncer

Google Compute Engine logo

Google Compute Engine

Databases

Google Cloud virtual machines billed per vCPU and per GB of memory

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; Google Compute Engine prices on request.
  • Only Google Compute Engine lists machine families; only PgBouncer lists session pooling.
  • Where Google Compute Engine falls short: you manage patching, hardening and scaling, so the effective cost includes operations time that serverless options remove.
  • Where PgBouncer falls short: works with PostgreSQL only; it cannot pool connections for other database engines.

How do Google Compute Engine and PgBouncer differ?

Google Compute Engine and PgBouncer differ on starting price (On request against Free), pricing model and free tier (No against Yes). Only the attributes on which Google Compute Engine and PgBouncer actually diverge.

Attributes where Google Compute Engine and PgBouncer differ
AttributeGoogle Compute EnginePgBouncer
Starting priceOn requestFree
Pricing modelPer vCPU and per GB of memory per hourOpen-source
Free tierNoYes
PlatformsWeb, APILinux, macOS, Windows

Not yet recorded: category for Google Compute Engine.

Which features does each one have?

They share no listed features; 5 appear only for Google Compute Engine 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 Google Compute Engine

  • Machine families
  • Custom machine types
  • Sustained use discounts
  • Committed use discounts
  • Free e2-micro

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?

Google Compute Engine is most often brought in for lift-and-shift of virtual machine workloads to Google Cloud; PgBouncer for reducing open connections to a busy PostgreSQL server. The jobs each tool is most often brought in to do.

Google Compute Engine

  • Lift-and-shift of virtual machine workloads to Google Cloudnot PgBouncer
  • GPU and high performance computing jobsnot PgBouncer
  • Self-managed databases or legacy servers needing OS controlnot PgBouncer
  • Cost-optimised batch work on spot capacitynot PgBouncer

PgBouncer

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

Where do Google Compute Engine and PgBouncer fall short?

Google Compute Engine's most cited limit: machine type choice is wide, and picking the wrong family wastes money until you resize. 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.

Google Compute Engine

  • You manage patching, hardening and scaling, so the effective cost includes operations time that serverless options remove
  • Bills combine vCPU, memory, disks, network egress and licences, which makes forecasting hard without the pricing calculator
  • Machine type choice is wide, and picking the wrong family wastes money until you resize
  • Sustained use discounts do not stack with committed use discounts, so savings depend on getting commitments right
  • Network egress charges can exceed compute cost for data-heavy applications

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 Google Compute Engine and PgBouncer cost?

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

Google Compute Engine

On request
  • On demandOn request
    • vCPU and memory billed separately
    • Sustained use discounts up to 30%
    • Committed use discounts available

PgBouncer

Free

No published plan breakdown. See the PgBouncer review.

Which should you pick?

Choose Google Compute Engine if

  • You need machine families.
  • You work on Web, API.
  • You also want custom machine types.

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 Google Compute Engine or PgBouncer better?
It depends on the job. Google Compute Engine fits lift-and-shift of virtual machine workloads to Google Cloud; PgBouncer fits reducing open connections to a busy PostgreSQL server. Google Compute Engine starts at On request and PgBouncer at Free.
Which is cheaper, Google Compute Engine or PgBouncer?
PgBouncer has a free tier; the other does not. Paid plans start at On request for Google Compute Engine and Free for PgBouncer.
Does Google Compute Engine or PgBouncer run on more platforms?
Google Compute Engine runs on Web, API. 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. Google Compute Engine starts at On request.
What is Google Compute Engine best used for?
Google Compute Engine is most often used for lift-and-shift of virtual machine workloads to google cloud, gpu and high performance computing jobs, self-managed databases or legacy servers needing os control, cost-optimised batch work on spot capacity. Of those, lift-and-shift of virtual machine workloads to google cloud and gpu and high performance computing jobs are not what PgBouncer is typically brought in for.
What can Google Compute Engine do that PgBouncer cannot?
Google Compute Engine covers Machine families, Custom machine types, Sustained use discounts, Committed use discounts. PgBouncer covers Session pooling, Transaction pooling, Statement pooling, Low memory use per connection.

Answered from the vendors’ own pages

Google Compute Engine: How is Compute Engine billed?

Per vCPU and per GB of memory per hour, plus disks and network.

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
Google Compute Engine: Is there a free VM?

Yes, Google Cloud offers a free e2-micro instance under its free programme.

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
Google Compute Engine: What discounts exist?

Sustained use discounts of up to 30% and committed use discounts.

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
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