> For the complete documentation index, see [llms.txt](https://inno-sufiyan.gitbook.io/smit-b-10/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://inno-sufiyan.gitbook.io/smit-b-10/smit-b-10/backend/scalable-system-and-its-benefits/bullmq/redis-with-aiven.md).

# Redis with Aiven

Aiven is a managed cloud service provider that offers a range of open-source data technologies as fully managed services. This includes databases, messaging systems, and analytics tools. Aiven provides these services on multiple cloud platforms, including AWS, Google Cloud, Azure, and more. Here are some key points about Aiven:

#### Aiven Overview

* **Managed Services**: Aiven offers managed services for various open-source data technologies such as PostgreSQL, MySQL, Apache Kafka, Redis, InfluxDB, Elasticsearch, Grafana, Cassandra, and M3.
* **Multi-Cloud Support**: Aiven supports deployment on multiple cloud providers, allowing users to choose the platform that best fits their needs.
* **Ease of Use**: Aiven simplifies the process of deploying, managing, and scaling data infrastructure, providing features like automated backups, monitoring, and maintenance.
* **Security**: Aiven provides robust security features including encryption in transit and at rest, and integration with authentication mechanisms.

#### Setting Up Redis with Aiven

1. **Sign Up and Log In**:
   * Create an account at [Aiven](https://console.aiven.io/signup).
   * Log in to your Aiven account.
2. **Create a Redis Service**:
   * In the Aiven dashboard, click on "Create a new service".
   * Select "Redis" from the list of available services.
   * Choose the cloud provider and region where you want to deploy your Redis service.
   * Configure your service by setting the plan, which determines the resources allocated to your Redis instance.
   * Click "Create Service" to deploy your Redis instance.
3. **Get Connection Details**:
   * After the service is created, go to the service's overview page.
   * You will find the connection details including the hostname, port, username, and password. These details are necessary for connecting to your Redis instance.
4. As using free services, donot forget to disable ssl from service settings, and use plain text host url
5. Redis Insights - To see Job Queue - Free Software Tool

#### Example: Connecting BullMQ to Aiven Redis

Here is how you can use the connection details from Aiven to configure BullMQ:

**Example Code**

```javascript
import { Queue } from "bullmq";

// Define connection details for Aiven Redis
const connection = {
  host: "your-aiven-redis-host",   // e.g., redis-17528355-piyushgarg-2e77.aivencloud.com
  port: 23898,                     // The port provided by Aiven
  username: "default",             // Username provided by Aiven
  password: "your-aiven-password", // Password provided by Aiven
};

// Create a new queue instance with the specified connection details
const emailQueue = new Queue("email-queue", { connection });

// Add a job to the queue
emailQueue.add("send-email", {
  from: "your-email@example.com",
  to: "recipient@example.com",
  subject: "Hello from BullMQ",
  body: "This is a test email.",
});
```

#### Summary

* **Aiven** is a managed cloud service provider offering various open-source data technologies.
* **Setup** involves creating an account, deploying a Redis service, and retrieving connection details.
* **Integration** with BullMQ is straightforward by using the provided connection details to configure the queue.

By using Aiven, you can leverage managed services to simplify the deployment and management of your data infrastructure, allowing you to focus on application development and business logic.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://inno-sufiyan.gitbook.io/smit-b-10/smit-b-10/backend/scalable-system-and-its-benefits/bullmq/redis-with-aiven.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
