Fast, simple, and cost effective Postgres CDC
Fast, simple, and cost effective Postgres CDC
Replace clunky tools like Debezium by streaming data from Postgres to SQS, Kafka, and more.
Capture every insert, update, and delete
Capture every insert, update, and delete
Bring your own (or any) Postgres database
Bring your own (or any) Postgres database
Sink to streams and queues in real-time
Sink to streams and queues in real-time
Built in backfills, rewinds, and transforms
Built in backfills, rewinds, and transforms
Open source, MIT license
Open source, MIT license
YAML
CLI
Web Console
databases:
- name: "sequin-playground"
username: "postgres"
password: "postgres"
hostname: "sequin_postgres"
database: "sequin_playground"
port: 5432
slot_name: "sequin_slot"
publication_name: "sequin_pub"
sinks:
- name: "kafka-sink"
database: "sequin-playground"
table_schema: "public"
table_name: "accounts"
destination:
type: "kafka"
hosts: "kafka1.example.com:9092,kafka2.example.com:9092"
topic: "accounts-topic"
username: "kafka-user"
password: "kafka-password"
$ brew install sequin
$ sequin sinks list
NAME KIND DATABASE TABLE FILTER STATUS
user-events kafka production users user.type='premium' ACTIVE
order-webhook webhook production orders status='completed' ACTIVE
cache-updates redis production cache_events action='invalidate' ACTIVE
notification-sqs sqs production notifications priority='high' DEGRADED
audit-logs nats production audit environment='prod' ACTIVE
$ sequin sinks cache-updates messages
TIMESTAMP ID KEY ACTION STATUS LATENCY
2024-01-15T10:23:45.332Z msg_8d7e6f5c4b3a2c1d users:profile:1234 invalidate DELIVERED 12ms
2024-01-15T10:23:45.198Z msg_7c6b5a4d3e2f1g0h products:catalog:555 invalidate DELIVERED 8ms
2024-01-15T10:23:44.892Z msg_6b5a4c3d2e1f0g9h orders:cart:789 update RETRY(1/3) 245ms
2024-01-15T10
Guarantees
Guarantees
Guarantees
Capture & deliver every row
Capture & deliver every row
Sequin is a tool for change data capture (CDC) in Postgres. Sequin never misses an insert, update, or delete and delivers every (100%) change to your stream or queue.
Sequin is a tool for change data capture (CDC) in Postgres. Sequin never misses an insert, update, or delete and delivers every (100%) change to your stream or queue.
Key features
Key features
Key features
A new standard for CDC
A new standard for CDC
Change data capture typically requires adding complicated dependencies, endless configuration, and blackbox runtimes. Sequin is tailored to Postgres to cut out the complexity and deliver helpful features.
Change data capture typically requires adding complicated dependencies, endless configuration, and blackbox runtimes. Sequin is tailored to Postgres to cut out the complexity and deliver helpful features.
SQL filters
Use WHERE clauses to route changes to your sinks.
function onRow(r) {
switch (r.status) {
case 'active': return JSON.stringify('running');
case 'pending': return JSON.stringify('waiting');
default: return JSON.stringify('unknown');
}
}
function onRow(r) {
switch (r.status) {
case 'active': return JSON.stringify('running');
case 'pending': return JSON.stringify('waiting');
default: return JSON.stringify('unknown');
}
}
Transforms
Transform messages with JS and Go
Rewind
Backfill and re-backfill at any time.
Observable
Trace every row from capture through to delivery
No infra needed
Built-in streaming
Out of the box, you can send database changes to a webhook sink or turn on a Sequin Stream. Both offer a durable, kafka-like stream with exactly-once processing guarantees with a simple HTTP interface.
//Sequin pushes rows to your HTTP endpoint
//Example lambda handler:
exports.order_handler = async (event) => {
try {
processOrder(event.data.action, event.data.record);
return {
//message will be ack'd
statusCode: 200,
};
} catch (error) {
console.error('Error:', error);
return {
//message will be nack'd & retried
statusCode: 500,
};
}
};
# Receive messages from a consumer
curl -X 'GET' 'https://api.sequinstream.com/consumer/receive'
# Returns
{
"data": [
{
"ack_token": "MTYyeJ7abUjl1pO",
"data": {
"record": {
"id": 1,
"name": "Paul Atreides",
# more fields...
}
}
},
# more messages...
]
}
# Acknowledge a message
curl -X 'POST' 'https://api.sequinstream.com/consumer/ack'
-d '{ "ack_token": ["MTYyeJ7abUjl1pO"] }'
Webhook sink
POST changes from your database to any HTTP endpoint. Built in retries and back-off.
Sequin Stream
Change Retention
Use cases
Streamline your use case
Sequin is designed to power every CDC use case. No need to master a new piece of infrastructure.
Create
Audit logs
Replicate
Tables
Maintain
Caches
// Automatically log all database changes with Sequin
async function logDatabaseChange(change) {
await db.query(`
INSERT INTO audit_logs (
event_id,
table_name,
record_id,
action,
old_values,
new_values
) VALUES ($1, $2, $3, $4, $5, $6)
`, [
change.id,
change.metadata.table_name,
change.record.id,
change.action,
JSON.stringify(change.changes), // Previous values
JSON.stringify(change.record) // New values
]);
}
// Example: Capture an order status change
await logDatabaseChange({
id: "evt_123",
action: "update",
metadata: { table_name: "orders" },
record: { id: "order_123", status: "shipped" },
changes: { status: "pending" }
});
Create an Audit Log
Track every change in your database with reliable, automated audit logs. Sequin captures the full history of modifications to your data, letting you meet compliance requirements, debug issues, and build powerful user features like activity feeds - all without modifying your application code.
// Replicate tables across databases with Sequin
async function replicateChange(change) {
// Handle inserts, updates, and initial data
if (change.action !== 'delete') {
await db.query(`
INSERT INTO products_replica (
id,
name,
price,
updated_at
) VALUES ($1, $2, $3, $4)
ON CONFLICT (id) DO UPDATE SET
name = EXCLUDED.name,
price = EXCLUDED.price,
updated_at = EXCLUDED.updated_at
`, [
change.record.id,
change.record.name,
change.record.price,
new Date()
]);
} else {
// Handle deletes
await db.query('DELETE FROM products_replica WHERE id = $1', [change.record.id]);
}
}
// Example: Replicate a product update
await replicateChange({
action: "update",
record: { id: "prod_123", name: "Coffee Maker", price: 99.99 }
});
Replicate Tables
Seamlessly replicate data between databases in real-time. Sequin handles the complex parts of database replication - like race conditions, schema transformations, and failure recovery - so you can sync your data with just a few lines of code.
// Keep Redis cache in sync with your database
async function updateCache(change) {
const cacheKey = `products:${change.record.id}`;
if (change.action !== 'delete') {
// Update cache for inserts/updates
await redis.set(cacheKey, JSON.stringify({
...change.record,
cached_at: new Date()
}));
} else {
// Remove deleted items from cache
await redis.del(cacheKey);
}
}
// Example: Cache product update
await updateCache({
action: "update",
record: { id: "prod_123", name: "Coffee Maker", price: 99.99 }
});
Maintain Cache
Keep your caches automatically in sync with your database. Sequin streams changes directly to Redis, Memcached, or your caching layer of choice - eliminating cache inconsistencies and the complexity of manual cache invalidation.
Performance
Performance
Performance
Tuned to Postgres
Tuned to Postgres
Sequin uses logical replication to efficiently capture every change as it happens. If your database can handle the transaction, Sequin can deliver it with minimal overhead.
Sequin uses logical replication to efficiently capture every change as it happens. If your database can handle the transaction, Sequin can deliver it with minimal overhead.
Messages / Second
P95 Latency (MS)
We're happy to host
Sequin Cloud
Fully managed service, we handle the infrastructure
Built to scale, tuned to support high message volume
Get started right away
Get started right away
Widely supported
Widely supported
Widely supported
Works with your stack
Works with your framework
Sequin works with any Postgres database (version 12+) and supports a growing list of sinks to queues and streams. Sequin even supports native sinks (Webhooks and HTTP) so you can get started without any other infrastructure.
Sequin works with any Postgres database (version 12+) and supports a growing list of sinks to queues and streams. Sequin even supports native sinks (Webhooks and HTTP) so you can get started without any other infrastructure.
Community
Community
Community
Open source
Open source
Sequin is completely open source with an MIT license. Follow us on GitHub. Let us know what you want to see!
Sequin is completely open source with an MIT license. Follow us on GitHub. Let us know what you want to see!
Discord
Join the Sequin Discord server to chat with contributors, get support, and discuss your use case.
Pricing
Pricing
Pricing
Plans and pricing
Plans and pricing
Sequin itself is built on Postgres to provide the most efficient, cost effective CDC on the market.
Open Source
Cloud
Change data capture from Postgres to streams and queues
Change data capture from Postgres to streams and queues
SQL filtering, JS & Go transforms, rewinds, CLI, and web console
SQL filtering, JS & Go transforms, rewinds, CLI, and web console
Docker container to setup and install Sequin with just Postgres and KV dependencies
Discord support
Discord support
Small
Up to 4 vcores
$1000
/ month
per month
Recommended for up to 500 million rows per month.
High-availability with autoscaling
High-availability with autoscaling
White-glove implementation support with dedicated Slack channel
CLI tunnels into local resources
CLI tunnels into local resources
Medium
Up to 8 vcores
$2000
/ month
per 100K delivered rows
Recommended for up to 1 billion rows per month.
For production apps,
pay-as-you-go
High-availability with autoscaling
High-availability with autoscaling
White-glove implementation support with dedicated Slack channel
White-glove implementation support with dedicated Slack channel
CLI tunnels into local resources
CLI tunnels into local resources
Extended data retention for replays
Extended data retention for replays
Large
Up to 16 vcores
$4000
/ month
per month
Recommended for up 1 billion+ rows per month
For businesses with predictable streams
High-availability with autoscaling
High-availability with autoscaling
White-glove implementation support with dedicated Slack channel
White-glove implementation support with dedicated Slack channel
CLI tunnels into local resources
CLI tunnels into local resources
Extended data retention for replays
Extended data retention for replays
24 x 7 production support with SLAs
24 x 7 production support with SLAs
Get in touch
Get in touch
Have more questions or want to talk through your use case first?
©️ 2024 Sequin Labs, Inc. All rights reserved.
©️ 2024 Sequin Labs, Inc. All rights reserved.
©️ 2024 Sequin Labs, Inc. All rights reserved.