Introducing Defer: A Zero Infrastructure background jobs Node.js platform
Tags: node, performance, javascript, devops
Published: 2023-03-04 02:48:26

Hi dev.to community 👋

I am Charly, co-founder of Defer, a Zero Infrastructure Node.js background jobs platform.
I've been previously working at Algolia and doing open-source with [The Guild](https://dev.to/the-guild).


As all of you, Bryan - my cofounder, and I experienced over the years how modern web apps must be performant while being integrated with many 3rd party APIs.
Such requirements make **background jobs an essential** part of modern Node.js technical stacks.
<br />
Still, while the **Node.js developer experience improved in recent years**
(_building and deploying Serverless applications with Vercel, scaling your database with Supabase, or setup a robust logs stack with Logtail_), **the experience remained the same around background jobs**.

<br />

Today, working with background jobs requires developers to do some **infrastructure work** (either on AWS SQS or at least set up a Redis and workers) 
and deal with queueing libraries that come with a dedicated **mental model to learn and boilerplate code** to write.

<br />

Finally, operating background jobs in production, at scale, often require more infrastructure work and **building internal dashboards**
to better support customers (_ex: "Find jobs that failed for user#1234" is a tricky task with existing queueing dashboard_).

<br />
<br />

We believe that **background jobs play an important part** - as important as running API close to end-users (on edge) - to build swift user experiences.
For this reason, working with background jobs should be as simple as building Serverless apps with Vercel
or scaling a database with Supabase.
<br />
Defer fill that gap by bringing a **zero infrastructure** approach and **full-featured API and dashboard** with
configurable retries, throttling, concurrency, support for multiple environments, alerting, and more.

<br />

We hope Defer will enable **all JavaScript and TypeScript developers** (front-end and back-end developers) to **build powerful applications faster**.

<br />

## Introducing: Defer 1.0 RC

### Background functions

Defer comes with a Zero-API approach that makes it easy to create or transform existing functions into background functions (function version of a background job) **without the usual distracting boilerplate code** (queues, workers) that current solutions bring:

```tsx
import { defer } from "@defer/client"

const importContacts = () => {
  // ...
}

export default defer(importContacts, {
  retry: 2,
  concurrency: 1
})
```

<br />

_The same developer experience applies to [Delayed Functions](https://docs.defer.run/features/delay/), [CRON](https://docs.defer.run/features/cron), and [Workflows](https://docs.defer.run/features/workflows)_

<br />
<br />

### Zero-infrastructure, full scale.

Defer's infrastructure then **handles background function executions** with the configured parallelism and retries, **without infrastructure work or DevOps knowledge**.

![Defer Dashboard](https://www.defer.run/blog/defer-public-access/executions.png)

<br />

_More information on [Builds](https://docs.defer.run/platform/builds/), [Executions](https://docs.defer.run/platform/executions/) and [Limits](https://docs.defer.run/platform/limits/)._

<br />
<br />

### Defer Dashboard: productivity at your fingertips.

The Defer Dashboard allows you to manage applications with multiple environments and **get a sense of their product's health** with **analytics and filters-rich executions list** view:

![Defer Dashboard](https://www.defer.run/blog/defer-public-access/functions.png)

Finally, you get [notified on Slack upon failure](https://docs.defer.run/platform/alerting/) and quickly access the execution's logs and business metadata to **narrow down the issue and keep users in the loop**.

<br />
<br />


We are happy to open Defer to all users, [with a generous free Hobby plan](https://api.defer.run/connect/github?plan=free) - no credit card required, that fits perfectly for personal projects and solo founders!

<br />

We would love to get feedback from the community 👀