- Documentation
Volcano Engine Function as a Service
Best Practices
Data processing
Synchronizing Kafka data to ES by using veFaaS
Data processing
Synchronizing Kafka data to ES by using veFaaS
Synchronizing Kafka data to ES by using veFaaS
The following content introduces how to use the microservices application template that is built on Volcano Engine Function as a Service (veFaaS) to quickly launch a data processing service, which can read data from Message Queue for Kafka to Cloud Search (ES). Scenario introduction
Data processing services are mainly used for log processing and analysis, helping enterprises quickly identify and resolve issues and improve operational efficiency. In large systems, to ensure proper collection and analysis of complex log data, the common approach is using Kafka streaming architecture for large-scale asynchronous data collection. In turn, the collected log data is read by consumer components from Kafka and written in Elasticsearch. veFaaS is an alternative to open-source LogStash. Self-built LogStash solutions face issues such as data loss, poor collection performance, high resource consumption, and steep learning curves. The veFaaS is a Serverless data processing solution that is simpler, lighter, and provides advantages such as auto-scale, low cost, high throughput, and low latency. Prerequisites
- For Virtual Private Cloud (VPC)
- Permission for using Volcano Engine Virtual Private Cloud has been obtained.
tip
We recommend confining data transmission within the VPC, i.e., creating Kafka instances, ES instances, and veFaaS microservices applications within the same VPC.
- Permission for using Message Queue for Kafka on Volcano Engine has been obtained.
- Cloud Search service (ES)
- Permission for using Volcano Engine Cloud Search has been obtained.
- An ES instance has been created. Note that there are requirements for selecting a specific ES version and setting a login password. For details, see Creating instances.
Procedure
Step 1: Create a microservices application
Select the vefaas-native-microservice-kafka-to-es-exporter function template to create the application instantly.
- In the top navigation bar, select the target region.
- On the Function list page, click Create function, and then select Create [Microservices applications].
- Configure the options on the page as required. The table below contains descriptions of the key options on the page. The rest can keep the default settings.
- Click Create to create the function.
Step 2: Update the configuration file
Update the config.json file with your Kafka and ES configurations.
- On the Code tab of the function, click the download icon in the upper right to download the code package.
- Extract the code package.
- Update the config.json file.
- Copy the config_template.json file in the code package to a new file named config.json.
- Modify the config.json file as needed.
- Run sh build_and_zip.sh to start code compilation and packaging.
warning
It must be executed on a Linux platform. Cross-compilation is not supported.
- On the Code tab of the function, click Upload > Upload local file to upload the code package generated in step 4.
Step 3: Deploy the application
Deploy the current code and configuration of the function online.
- On the function details page, click Release in the upper right corner.
- Select Latest for the function version. Keep other parameters as default.
- Click OK. Wait until the function release is finished.
Validating results
- Send a message using Kafka Topic.
- On the Message Queue for Kafka console, click the instance to go to the Instance details > Topic management tab, then click Send message in the Action column of the corresponding topic. Send the word hello as a message.
- Use ES API to check if the document was created successfully.
- The expected ES response is shown below:
Relevant operations
Once deployed, veFaaS automatically scales in or out based on workload. No manual adjustment to the instance count required. You can also set scaling policies as needed. For details, refer to Elastic scaling. Last updated: 2026.08.19 14:06:07