20 min read

Learning Objectives

By the end of this module, you will be able to:

  • Explain what managed database services are and why organizations choose them over self-managed solutions
  • Describe the key characteristics and use cases for Managed PostgreSQL, MongoDB, and MariaDB
  • Identify when to use In-Memory DB for caching and real-time analytics
  • Explain how Event Streams for Apache Kafka enables real-time data processing and IoT scenarios

Unit 2.5: Database and Data Services

Introduction

Imagine a busy restaurant kitchen where the chef focuses entirely on creating amazing dishes while a dedicated team handles equipment maintenance, ingredient inventory, and cleaning. The chef does not worry about fixing the ovens or ordering supplies because those responsibilities belong to specialists. Managed database services work the same way. They let your team focus on building great applications while IONOS handles the infrastructure, patching, backups, and maintenance.

In this unit, you will explore IONOS Database-as-a-Service (DBaaS) offerings. You will learn about relational databases like Managed PostgreSQL and MariaDB for structured data, document databases like Managed MongoDB for flexible schemas, In-Memory DB for ultra-fast caching, and Event Streams for Apache Kafka for real-time event processing. Understanding these services helps you choose the right database for your application needs.

1. Managed Databases Overview

Database-as-a-Service (DBaaS) delivers fully managed database engines that run on dedicated infrastructure inside your Virtual Data Center. IONOS handles provisioning, patching, backups, and high availability while you retain full control over your data and database configuration.

1.1 What Makes a Database "Managed"

A managed database service takes responsibility for the entire database stack, from hardware and operating system to the database engine and ongoing maintenance. You provision a cluster through the Data Center Designer or API, and within minutes you have a production-ready database without installing software or configuring servers.

Managed databases differ from self-managed deployments in several key ways. The cloud provider supplies the hardware, applies firmware and operating system patches, and manages database software updates. You avoid purchasing physical servers, racking equipment, and maintaining infrastructure. Databases come pre-configured with security best practices, automated backups, and high-availability features built in. Your team focuses on schema design, query optimization, and application development instead of routine operations.

1.2 Benefits of Managed Database Services

The following table compares managed databases to self-managed deployments across critical operational areas:

Area Managed DB Benefits Self-Managed Requirements
Hardware & Firmware Provider provisions, installs and maintains servers, drivers, and firmware automatically Purchase, rack, power, network-connect and patch physical machines manually
Initial Setup Databases are pre-configured and ready to use on demand Install database software, tune parameters, configure replication and security
Operations & Staffing Staff focuses on application development instead of routine operations Requires DBAs or engineers to handle installs, patches, monitoring, and troubleshooting
Patching & Upgrades Regular patches applied automatically during maintenance windows Track security releases, schedule downtime, test upgrades, apply manually
High Availability Built-in HA clusters with automatic fail-over and replication Design and implement your own replication topology and test fail-over procedures
Backup & Restore Daily automated backups with point-in-time recovery Deploy backup agents, schedule snapshots, manage retention, test restores
Scalability Vertical and horizontal scaling via API or console Procure larger servers, add nodes, re-configure load balancers, migrate data
Security TLS encryption, role-based access control, private-network connectivity Harden OS, manage certificates, configure firewalls and network segmentation
Monitoring Integrated metrics, logs, alerts available in control panel or via API Install monitoring agents, build dashboards, maintain alerting pipelines
Cost Model Pay-as-you-go per-minute billing for resources used Capital expense for hardware, over-provisioned capacity, long-term contracts

Managed databases deliver speed and simplicity by providing production-ready environments in minutes. They offer reliability through automated high-availability configurations and vendor-supported patches. They improve operational efficiency by freeing your team from routine administration tasks. They provide financial flexibility through consumption-based pricing that scales with your actual usage.

1.3 Common Managed Database Features

All IONOS managed database services share core capabilities that ensure enterprise-grade reliability and security. Every service runs on dedicated virtual machines with guaranteed CPU, RAM, and storage resources. Clusters deploy within private LANs in your Virtual Data Center, ensuring network isolation and security.

High availability comes standard through multi-node clusters with automatic fail-over. If one node fails, the cluster automatically promotes a replica to maintain service continuity. Replication can be configured as asynchronous for best performance or strict-synchronous for zero data loss (availability varies by engine).

Security is built into every layer. All client connections use TLS encryption to protect data in transit. Role-based access control lets you define granular permissions for users and applications. Databases are reachable only through private networks, never exposed directly to the internet. Backups are encrypted and stored securely in IONOS Cloud Object Storage.

Automated backups run daily across all engines, with point-in-time recovery typically available for up to one week; for Managed MongoDB, PITR is available on the Enterprise edition only (Business supports snapshot restore, and Playground backups are disabled). You can restore entire clusters or specific databases to any moment during the retention period. Maintenance windows allow you to schedule patches and upgrades at convenient times with minimal disruption.

Monitoring and reporting are integrated into the Data Center Designer and available through APIs. You can track CPU usage, memory consumption, storage capacity, connection counts, and query performance. Metrics and logs help you optimize performance and troubleshoot issues before they impact users.

2. Relational Database Services

Relational databases organize data into tables with defined schemas, enforce relationships through foreign keys, and support complex queries using SQL. IONOS offers two relational database engines: PostgreSQL and MariaDB.

2.1 Managed PostgreSQL

Managed PostgreSQL delivers a fully compatible, enterprise-class PostgreSQL database as a managed service. PostgreSQL is known for its advanced features, extensibility, and support for both traditional relational data and modern JSON documents. It runs on dedicated clusters with configurable CPU, RAM, and storage inside your Virtual Data Center.

PostgreSQL supports ACID transactions, ensuring data consistency and reliability for mission-critical applications. It provides advanced indexing options, full-text search, and powerful query optimization. You can use PostgreSQL extensions to add functionality like geospatial data support (PostGIS), advanced statistics, and cryptographic functions. The database handles both structured data in tables and semi-structured data stored as JSON or JSONB.

Key capabilities include vertical scaling (add CPU, RAM, storage on the fly) and horizontal scaling (add replica instances for read traffic). High availability is achieved through multi-node clusters with configurable replication modes. Choose asynchronous replication (the default) for best performance, or strict-synchronous for zero data loss commit guarantees. Strict-synchronous replication requires at least three replicas.

Monitoring exposes cluster metrics through the Data Center Designer, Telemetry API, and Monitoring Service, with retention length configurable by the customer (longer retention increases storage cost; no fixed default period is published). Automated backups combine continuous write-ahead log (WAL) archiving with daily base backups, enabling point-in-time recovery for up to one week. You can even clone clusters from existing backups for testing or development environments.

2.2 Managed MariaDB

Managed MariaDB provides a MySQL-compatible relational database that originated as a community-driven fork of MySQL. It powers high-traffic services like Wikipedia and WordPress.com. MariaDB offers familiar MySQL syntax and behavior while adding enhancements for performance, storage engines, and analytics.

MariaDB is fully ACID-compliant and supports triggers, stored procedures, and views. It includes multiple storage engines optimized for different workloads, from transactional InnoDB to column-store engines for analytics. Native support for JSON and GIS functions makes it suitable for applications that mix structured and semi-structured data.

The service provides vertical scaling up to 16 cores and 32 GB RAM per node, with multi-node high-availability clusters for automatic fail-over. Each user has 250 connections and max_connections is set to 500. Storage is SSD-backed, the upper limit for Storage Size is 2 TB.

A unique self-restore feature lets you restore specific backups or roll back to any point in time during the one-week retention period directly through the Data Center Designer or API. This capability reduces downtime and data loss risk without requiring support tickets.

2.3 Choosing Between PostgreSQL and MariaDB

Both PostgreSQL and MariaDB are excellent relational databases, but they excel in different scenarios. Understanding when to use each helps you make the right choice for your application.

Choose PostgreSQL when you need sophisticated features like advanced indexing, extensive extensions, or strict transactional consistency. PostgreSQL excels at complex analytical queries, applications that mix relational and JSON data, and workloads requiring synchronous replication with zero data loss. It is ideal for financial systems, ERP applications, and data warehousing where ACID guarantees and query flexibility are critical.

Choose MariaDB when you have existing MySQL knowledge or applications, need a familiar MySQL-compatible syntax, or are building web applications and e-commerce platforms. MariaDB offers excellent performance for high-concurrency read-heavy workloads and provides strong GIS and JSON capabilities. It is well-suited for content management systems, SaaS platforms, and scenarios where MySQL compatibility simplifies migration.

3. Document Database and NoSQL Services

Document databases store data as flexible JSON-like documents instead of fixed-schema tables. This flexibility makes them ideal for applications with rapidly evolving data models or highly variable data structures.

3.1 Managed MongoDB

Managed MongoDB is IONOS's fully managed service for the MongoDB document database. MongoDB stores data as BSON documents (binary JSON) in collections, allowing each document to have a different structure. This schema flexibility accelerates development by eliminating rigid schema migrations.

MongoDB is offered in three editions to match different needs. Playground edition provides a free single-node cluster with 2 GB RAM, 1 vCPU, and 50 GB storage on shared infrastructure for development and testing. Business edition offers pre-defined templates for production workloads with multi-instance clusters based on Cube VMs and NVMe storage. Enterprise edition provides full control over node sizing using Dedicated Core VMs, SSD and HDD Block Storage, sharding configurations, and includes access to MongoDB's professional support team in addition to IONOS support.

Key capabilities include horizontal scaling through built-in sharding and replica sets. Sharding distributes data across multiple nodes to handle massive datasets and high write throughput. Replica sets provide high availability with automatic fail-over. MongoDB supports up to approximately 114,000 connections per cluster, far exceeding relational database connection limits.

NVMe storage is available in Business edition that is hosted on Cube VMs. SSD or HDD block storage is available in the Enterprise edition that is hosted on dedicated core VMs. Multi-instance clusters automatically replicate data across nodes, with the primary handling writes and secondaries serving reads. The service includes continuous log collection with 30-day retention and built-in metrics for CPU, memory, storage, connections, and cluster health.

MongoDB is certified by MongoDB Inc. and fully compatible with standard MongoDB tools, drivers, and the mongo shell. You manage clusters through the Data Center Designer, the dedicated MongoDB REST API, or SDKs. Daily off-site snapshots are stored in Object Storage for up to seven days, and Enterprise clusters add point-in-time recovery.

3.2 When to Use MongoDB

MongoDB excels in scenarios where schema flexibility is valuable. Rapid development projects benefit from the ability to change document structure without database migrations. Content management systems, mobile application backends, and IoT platforms often have variable data structures that fit naturally into document models.

High-write workloads leverage MongoDB's horizontal scaling through sharding. Applications that generate massive volumes of data, such as click-stream analytics or user event tracking, can distribute writes across multiple shards for better performance. The document model also simplifies storing complex nested data structures that would require multiple tables and joins in relational databases.

Use MongoDB when your application has evolving requirements and you need to add new fields or change data structures frequently. Choose it for multi-tenant SaaS applications where each tenant may have custom fields. Consider it for real-time analytics where schema flexibility and high connection counts are advantages.

4. Specialized Database Services

Beyond traditional relational and document databases, IONOS offers specialized services for caching and event streaming. These services solve specific performance and architectural challenges.

4.1 In-Memory DB

In-Memory DB is IONOS's fully managed, Redis-compatible database service that stores all data in RAM for sub-millisecond access times. Unlike disk-based databases that read from storage, In-Memory DB serves data directly from memory, delivering performance thousands of times faster.

The service is built on Redis, an open-source in-memory data structure server. It supports various data types including strings, hashes, lists, sets, sorted sets, bitmaps, hyperloglogs, geospatial indexes, and streams. This flexibility makes it useful beyond simple key-value caching.

Persistence options let you balance speed with durability. Choose no persistence for pure caching where data can be rebuilt, RDB snapshots for periodic checkpoints, AOF (Append-Only File) logging for continuous write durability, or combine both for maximum protection. Persistence writes data to SSD so that clusters can recover after restarts.

In-Memory DB provides vertical scaling (add CPU, RAM, storage) and horizontal scaling (add nodes). Storage capacity scales automatically based on RAM and the chosen persistence mode. High availability is achieved through multi-node clusters with asynchronous replication by default, with an optional semi-synchronous mode for stronger consistency.

Security includes TLS-encrypted client connections, role-based access control, and private-network-only deployment. Each instance runs on dedicated Enterprise VMs and is reachable only via private LANs within your VDC. Resource limits include a maximum of 16 CPU cores, 32 GB RAM, 2 TB storage per instance, and up to 10 default instances per contract.

4.2 In-Memory DB Use Cases

In-Memory DB excels as a database caching layer. Place it in front of your primary database to store frequently accessed data in RAM. This reduces the number of queries hitting your database, lowers latency, and improves overall application responsiveness. Caching is especially valuable for read-heavy workloads where the same data is accessed repeatedly by many users.

Real-time analytics applications use In-Memory DB to process streaming data with sub-millisecond latency. Online advertising platforms, recommendation engines, and real-time dashboards require instant data access that disk-based storage cannot provide. In-Memory DB can aggregate large volumes of events in memory, perform calculations, and serve results to applications immediately.

Session storage is another common use case. Web applications store user session data in In-Memory DB for fast access across multiple application servers. The in-memory storage ensures that session lookups do not slow down user interactions. Message brokering and leaderboards for gaming applications also benefit from the speed and data structure support that In-Memory DB provides.

4.3 Event Streams for Apache Kafka

Event Streams for Apache Kafka is IONOS's fully managed service for real-time event streaming and processing. Apache Kafka is a distributed streaming platform that acts as a high-throughput message broker and event log. Applications publish event streams to Kafka topics, and other applications subscribe to those topics to process events in real time.

Kafka organizes data into topics, which are partitioned and replicated across multiple brokers for scalability and durability. Partitions allow parallel processing while maintaining message order within each partition. Replication ensures that data is not lost if a broker fails. Producers write events to topics, and consumers read events at their own pace, enabling flexible architectures.

IONOS Event Streams provides five pre-defined cluster sizes from XS to XL, each with dedicated CPU, RAM, and SSD storage. You can scale clusters up or down as your throughput and storage needs change. High availability is built in through redundant nodes and automatic fail-over. You configure the replication factor to control how many copies of each partition exist across brokers.

Security includes TLS-encrypted communication, strong authentication through TLS certificates, and fine-grained authorization controls. Clusters attach to private LANs for isolated network traffic between your applications and Kafka. You can adjust partitions, retention time, and retention size to match throughput and storage requirements.

Management is available through the graphical Data Center Designer, APIs, and SDKs. You can create and configure clusters, topics, brokers, and permissions without deep Kafka expertise. The service handles the underlying infrastructure, patching, and monitoring, allowing your team to focus on building streaming applications.

4.4 Event Streams Use Cases

Event Streams excels at real-time data processing at scale. E-commerce platforms ingest millions of transactions, inventory updates, and user interactions per day. Kafka handles this volume through partitioning and parallel processing. Stream processing frameworks like Kafka Streams, Apache Flink, or Spark read from Kafka topics, perform complex event processing, and write results to downstream systems like databases or dashboards. This enables real-time personalization, fraud detection, and operational analytics.

IoT data management leverages Kafka to collect continuous streams from thousands of sensors. Smart city initiatives deploy Kafka clusters near edge locations to minimize latency. Sensors push telemetry into topics, and stream-processing jobs detect patterns, trigger alerts, and feed AI/ML pipelines. Log compaction keeps the latest state per device while retention policies manage historical data. This architecture enables real-time monitoring, anomaly detection, and predictive maintenance.

Click-stream analytics for websites and mobile apps is another common use case. User interactions flow into Kafka topics where they can be analyzed in real time to personalize content, detect behavior patterns, and track business metrics. Financial services use Kafka for transaction processing, regulatory reporting, and market data feeds where low latency and guaranteed ordering are critical.

5. Choosing the Right Database Service

Selecting the appropriate database service depends on your data model, consistency requirements, scalability needs, and performance expectations. Understanding the strengths of each option helps you match services to application requirements.

5.1 Decision Framework

The following table compares IONOS database services across key characteristics:

Feature / Consideration Managed PostgreSQL Managed MongoDB Managed MariaDB In-Memory DB Event Streams for Kafka
Data Model Relational (SQL) with JSON and GIS Document (BSON/JSON) Relational (MySQL-compatible) Key-value with data structures Event log / Message stream
Best For Complex transactions, ACID compliance, joins Flexible schemas, rapid development Web apps, MySQL migration Caching, real-time analytics Real-time event processing, IoT
Scalability Vertical + horizontal (replicas) Vertical + horizontal (sharding + replicas) Vertical + horizontal (replicas) Vertical + horizontal Horizontal (partitions)
Consistency Strong (strict-sync available) Eventual (configurable) Strong Eventual (configurable) Configurable per topic
Latency Low (milliseconds) Low (milliseconds) Low (milliseconds) Ultra-low (sub-millisecond) Low (milliseconds)
Storage Type SSD Premium (up to 2 TB) NVMe (Business), SSD or HDD (Enterprise - up to 4 TB) SSD (up to 2 TB) RAM + SSD persistence SSD
Use Cases Finance, ERP, data warehousing CMS, mobile backends, IoT Web apps, e-commerce, SaaS Session storage, real-time dashboards Streaming analytics, log aggregation

Use relational databases (PostgreSQL or MariaDB) when you need strong transactional consistency, complex joins across multiple tables, and well-defined schemas. Choose document databases (MongoDB) when your data model evolves frequently or varies by record. Select In-Memory DB when you need caching or ultra-low latency access. Choose Event Streams when you need to process high-volume event streams in real time.

5.2 Combining Database Services

Many applications use multiple database services together to meet different requirements. A common pattern pairs a relational database for transactional data with In-Memory DB for caching. The relational database ensures data integrity and supports complex queries, while the cache reduces load and improves response times.

Another pattern combines a primary database with Event Streams for real-time processing. Application writes go to the database and are also published as events to Kafka. Stream processors consume events to update search indexes, trigger workflows, or feed analytics systems. This architecture enables event-driven microservices and real-time data pipelines without coupling systems directly.

E-commerce platforms might use PostgreSQL for orders and inventory, MongoDB for product catalogs with variable attributes, In-Memory DB for shopping cart sessions, and Event Streams to process user activity and inventory updates in real time. Each service handles the workload it is best suited for, creating a flexible and performant architecture.

Common Use Cases

Real-world scenarios demonstrate how IONOS database services solve business challenges:

  1. E-Commerce Platform with Multi-Database Architecture: An online retailer uses Managed PostgreSQL for order processing and financial transactions where ACID guarantees are critical (Section 2.1). Product catalogs with varying attributes like clothing sizes and electronics specifications are stored in Managed MongoDB for schema flexibility (Section 3.1). Customer shopping carts and session data live in In-Memory DB for instant access and minimal latency (Section 4.1). User click-streams flow through Event Streams for Apache Kafka to power real-time recommendations and inventory updates (Section 4.3). This combination matches each data type to the optimal database service.
  2. SaaS Application with Caching and High Availability: A multi-tenant SaaS platform runs Managed MariaDB for customer data with multi-node high-availability clusters ensuring zero downtime (Section 2.2). In-Memory DB caches frequently accessed tenant configurations, significantly reducing the number of queries hitting the database and improving response times (Section 4.2). Automated backups with point-in-time recovery protect against data loss, and self-restore capabilities let the team quickly recover from mistakes without contacting support. The private-network deployment ensures tenant data isolation and security.
  3. IoT Platform with Real-Time Analytics: A smart city initiative collects data from thousands of traffic sensors and environmental monitors. Event Streams for Apache Kafka ingests sensor telemetry with partitioning for parallel processing (Section 4.3). Stream-processing jobs analyze traffic patterns in real time and trigger alerts when anomalies are detected. Historical sensor data is stored in Managed MongoDB using time-series collections optimized for write-heavy workloads (Section 3.1). In-Memory DB maintains the latest sensor states for instant dashboard updates (Section 4.1). This architecture processes millions of events per hour while maintaining sub-second latency for operational decision-making.

Summary

Database and data services are fundamental building blocks for cloud applications. IONOS provides fully managed database offerings that handle infrastructure provisioning, patching, backups, and high availability while you focus on application development and schema design. Managed services deliver faster time to market, lower operational overhead, and consumption-based pricing compared to self-managed deployments.

Relational databases like Managed PostgreSQL and MariaDB provide strong consistency, ACID transactions, and SQL query capabilities for traditional applications requiring structured data and complex joins. Document databases like Managed MongoDB offer schema flexibility and horizontal scaling for modern applications with evolving requirements. Specialized services including In-Memory DB for caching and Event Streams for Apache Kafka enable real-time processing and ultra-low latency access patterns.

Choosing the right database service requires understanding your data model, consistency needs, scalability requirements, and performance expectations. Many applications combine multiple services to leverage the strengths of each. Understanding these options helps you design architectures that are performant, reliable, and cost-effective.

Key Points:

  • Managed database services handle infrastructure, patching, backups, and high availability automatically, freeing your team to focus on applications instead of operations
  • Managed PostgreSQL and MariaDB provide relational SQL databases with ACID compliance, suitable for transactional workloads, financial systems, and data warehousing
  • Managed MongoDB offers a document database with flexible schemas and horizontal scaling for content management, mobile backends, and rapidly evolving applications
  • In-Memory DB delivers sub-millisecond latency through RAM-based storage, ideal for caching, session storage, and real-time analytics
  • Event Streams for Apache Kafka enables high-throughput event streaming for real-time data processing, IoT telemetry, and event-driven architectures
  • Choosing the right database service depends on data model (relational vs document vs key-value vs streaming), consistency requirements, and scalability needs

Important Terminology:

  • Database-as-a-Service (DBaaS): Fully managed database service where the provider handles infrastructure, maintenance, and operations
  • ACID: Atomicity, Consistency, Isolation, Durability - properties that guarantee reliable database transactions
  • Replication: Copying data across multiple database nodes to provide high availability and fault tolerance
  • Point-in-Time Recovery (PITR): Ability to restore a database to any specific moment within the backup retention period
  • Sharding: Distributing data across multiple database nodes to scale horizontally and handle larger datasets
  • Document Database: NoSQL database that stores data as flexible JSON-like documents instead of fixed-schema tables
  • In-Memory Database: Database that stores data in RAM for ultra-fast access with sub-millisecond latency
  • Event Streaming: Continuous flow of event data through a distributed log system for real-time processing

Next Steps

Continue Learning: Unit 2.6: Security Services

Related Topics: