Ana içeriğe geç

Connections

Connection Features

A connection is a configuration containing information necessary to access an external system. Connections are defined once and can be used by multiple API Proxies or tasks.

Reusable

A connection can be used by multiple API Proxies or tasks

Centralized Management

Connections are managed and updated centrally

Security

Connection information is stored encrypted

Testable

Connections can be tested and validated

Connection Usage Flow

The following diagram shows how connections are used by API Proxies and policies:

sequenceDiagram
participant Client as 👤 Client
participant Gateway as 🚪 API Gateway
participant Proxy as 🔀 API Proxy
participant Policy as 🛡️ Policy/DB-2-API
participant Connection as 🔌 Connection
participant ExternalSystem as 🖥️ External System<br/>(DB, Kafka, Email, etc.)

Client->>Gateway: HTTP Request

Note over Gateway: Request Reached Gateway

Gateway->>Proxy: Route Request to API Proxy

Note over Proxy: API Proxy Processing

Proxy->>Policy: Policy or DB-2-API<br/>Executed

Note over Policy: External System Access Required

Policy->>Connection: Connection Usage<br/>(Centralized Configuration)

Note over Connection: Connection Information<br/>(Encrypted)<br/>Host, Port, Credentials

Connection->>ExternalSystem: Secure Connection<br/>Established (SSL/TLS)

Note over ExternalSystem: External System Types:<br/>Database (MongoDB, MySQL, etc.)<br/>Message Queue (Kafka, RabbitMQ)<br/>Email (SMTP)<br/>Search (Elasticsearch)

ExternalSystem->>Connection: Operation Result<br/>Returns

Connection->>Policy: Connection Result

Policy->>Proxy: Policy Processing Completed

Proxy->>Gateway: Processed Response

Gateway->>Client: HTTP Response

Note over Client,Gateway: Process Completed

Note over Connection,ExternalSystem: Connection Pool<br/>Management and<br/>Reuse

Connection Types

The Apinizer platform provides support for connections to a wide variety of external systems:

Database Connections

MongoDB

MongoDB NoSQL database connections

MySQL

MySQL database connections

PostgreSQL

PostgreSQL database connections

Oracle

Oracle database connections

MSSQL

Microsoft SQL Server connections

DB2

IBM DB2 connections

Sybase

Sybase database connections

Apache Hive

Apache Hive database connections

Apache Impala

Apache Impala database connections

Trino

Trino (PrestoSQL) database connections

Message Queue Connections

Kafka

Apache Kafka connections

RabbitMQ

RabbitMQ connections

ActiveMQ

Apache ActiveMQ connections

Search and Data Connections

Elasticsearch

Elasticsearch cluster connections

LDAP/AD

LDAP/Active Directory connections

Webhook

HTTP webhook connections

Communication Connections

SMTP/Email

Email server connections

FTP/SFTP

FTP/SFTP server connections

Linux Script

Linux script execution connections

Logging and Monitoring Connections

Graylog

Graylog GELF connections

Syslog

Syslog connections

Logback

Logback logging connections

SNMP

SNMP connections

Connection Configuration

When creating a connection, the following information is defined:

Basic Information
  • Connection Name: Unique name identifying the connection
  • Connection Type: Database, message queue, etc.
  • Description: Descriptive information about the connection (optional)
Connection Information
  • Host/URL: Server address or connection URL
  • Port: Connection port (varies by connection type)
  • Database Name: Database name (for database connections)
Authentication
  • Username: Username for the connection
  • Password: Password for the connection (stored encrypted)
  • Credential Usage: Whether credentials will be used
Advanced Settings
  • Connection Pool: Connection pool settings (min/max pool size, etc.)
  • Timeout: Connection timeout settings
  • SSL/TLS: Secure connection settings
  • Deploy to Worker: Whether to deploy to Worker
  • Enabled: Whether the connection is active

Connection Usage

Connections are used in the following situations:

API Proxy

DB-2-API can perform database queries

SQL queries can be executed using database connections and results can be returned as API responses.

API Integrator

Access to external systems is provided in Task Flows

Connections are used in Task Flows for operations such as database queries, message queue operations, and email sending.

Connectors

Used for connectors to connect to external systems

Connectors use connections to access different systems and exchange data.

Policies

Can be used for access to external systems within policies

Some policies can communicate with external systems using connections.

Connection Security

uyarı

Important Security Notes:

  • Connection information (username, password) is stored encrypted
  • Secure connections (SSL/TLS) must be used in production environments
  • Connection information is never written to log files
  • Connection information should be updated regularly
bilgi

Since connections are managed centrally, when a connection's information changes, all API Proxies and tasks using this connection automatically use the updated information.

Connection Management

After connections are created:

  • Testable: Connections can be tested and validated
  • Updatable: Connection information can be updated
  • Deletable: Connections that are no longer used can be deleted
  • Environment-Based: Connections can be assigned to specific environments
ipucu

When creating connections, optimize connection pool settings according to your system load. Use low pool size for small systems and high pool size for high-traffic systems.

Next Steps