In cloud environments like AWS and GCP, cross-AZ traffic incurs data transfer fees. AutoMQ can help avoid the traffic generated by Kafka’s production, consumption, and server-side replica replication. To configure AutoMQ to save on cross-AZ data transfer costs, the following conditions must be met:Documentation Index
Fetch the complete documentation index at: https://docs.automq.com/llms.txt
Use this file to discover all available pages before exploring further.
- Cloud Provider Environment Constraints: It is only recommended to configure AutoMQ’s multi-AZ write feature when deploying in a multi-AZ setup on AWS or GCP. If your application architecture is single-AZ or you are using other cloud providers (where cross-AZ traffic may be free or lower-cost depending on the cloud provider, region, and pricing policy), this configuration is not recommended.
-
Multi-AZ Deployment Constraints: To use AutoMQ’s multi-AZ write architecture to save on cross-AZ traffic, both the application and AutoMQ must be deployed in a multi-AZ setup.
- AZ Quantity Constraint: Currently, only three-AZ deployments for Producers, Consumers, and AutoMQ are supported. If Producers and Consumers are in more than three AZs, some cross-AZ traffic will still be generated.
- AZ Capacity Balance Constraint: Currently, only balanced AZ deployments are supported, meaning the capacity of Producer and Consumer applications is the same in each AZ. If the capacity is unbalanced, some cross-AZ traffic will still be generated.
Create an AutoMQ Instance
To use AutoMQ to save on cross-AZ data transfer costs, you first need to ensure that you create a compliant AutoMQ instance. The specific steps are as follows:- Log in to the AutoMQ BYOC environment.
- Create an instance, selecting three availability zones in the network configuration. Choose S3WAL or FSWAL as the WAL type.
Configure Mapping Rules to Identify Client’s Source CIDR Rack
Due to the limitations of the Kafka protocol, the server cannot perceive the Rack to which the Client belongs. To perceive the Client’s Rack and avoid cross-AZ production and consumption, AutoMQ provides two Rack configuration methods: client-side configuration▸ and server-side dynamic configuration. This chapter introduces the server-side dynamic configuration method usingautomq.zone.cidr.blocks.
The format for automq.zone.cidr.blocks is as follows:
- Configurations for different Zones are separated by
<>. - Each Zone’s configuration starts with the Zone name, followed by
@, and then a list of CIDRs for that Zone. CIDRs in the list are separated by,.
automq.zone.cidr.blocks is suitable for the following scenarios:
- There are clear CIDR segments between the Zones where the Clients are located.
- It is inconvenient to set different Client configurations based on the load’s Zone for computing engines like Flink, Spark, or Presto.
client.id > automq.zone.cidr.blocks > Consumer client.rack.