---
title: "APISIX Ingress ControllerがTraefikよりも優れた選択肢である理由 - API7.ai"
description: "本記事では、APISIX IngressがTraefikと比較して優れている理由を紹介します。"
url: "https://api7.ai/ja/blog/apisix-ingress-better-than-traefik"
---

[Blog](https://api7.ai/ja/blog)

[Products](https://api7.ai/ja/category/products)[Technology](https://api7.ai/ja/category/technology)[Ecosystem](https://api7.ai/ja/category/ecosystem)[Case Study](https://api7.ai/ja/category/usercase)[Team & Community](https://api7.ai/ja/category/community)

Search

⌘ + K

[Blog](https://api7.ai/blog)

Products

# APISIX Ingress ControllerがTraefikよりも優れた選択肢である理由

[![Jintao Zhang](https://avatars.githubusercontent.com/u/3264292?v=4)](https://github.com/tao12345666333)

[Jintao Zhang](https://github.com/tao12345666333)

November 4, 2022

[Products](https://api7.ai/category/products)

## Apache APISIX Ingress Controllerとは？

[Apache APISIX Ingress Controller](https://github.com/apache/apisix-ingress-controller/)は、Apache APISIXをデータプレーンとして使用するKubernetes Ingressコントローラーです。

以下のマルチルール設定をサポートしています：

- Ingress
- APISIX Ingress CRD（カスタムリソース）
- Gateway API

全体的に、Apache APISIX Ingress Controllerのアーキテクチャはデータプレーンとコントロールプレーンを分離し、Apache APISIXにトラフィックを処理させます。これにより、全体的なセキュリティが向上し、データプレーンに対する攻撃によるKubernetesクラスターへの攻撃を大幅に回避できます。

![APISIX Ingress Controllerアーキテクチャ](https://github.com/apache/apisix-ingress-controller/raw/master/docs/assets/images/module-0.png?imageMogr2/format/webp)

## Traefikとは？

Traefikは、Traefik Labsによって開発されたオープンソースのリバースプロキシおよびロードバランサーです。

Kubernetesでのマルチルール設定をサポートしています：

- Ingress
- Traefik IngressRoute（カスタムリソース）
- Gateway API

Traefikは単一のバイナリファイルであるため、コントロールプレーンとデータプレーンのプロキシロジックが結合されています。そのため、Traefikに対する攻撃やリモート実行のセキュリティ脆弱性が悪用されると、Kubernetesクラスターも攻撃される可能性があります。

![Traefikアーキテクチャ](https://doc.traefik.io/traefik/assets/img/architecture-overview.png?imageMogr2/format/webp)

## 比較

以下のセクションでは、APISIX Ingress ControllerとTraefikを以下の観点から比較します。

### サポートされているプロトコル

トラフィックゲートウェイとしてのコア能力は、プロキシトラフィックを正しく処理することです。Apache APISIX Ingress Controllerは、KubernetesクラスターのIngressゲートウェイとして、主に以下の2種類のトラフィックを処理します：

- クライアントとIngress間のトラフィック
- Ingressとアップストリームサービス間のトラフィック

以下のように表されます：

```
クライアント  <---->  Ingress  <---->  アップストリームサービス
```

現在、さまざまなプロトコルが存在します。ここでは、APISIX Ingress ControllerとTraefikのプロトコルに関する簡単な比較表を示します。

| プロトコル      | APISIX Ingress Controller | Traefik |
| ---------- | ------------------------- | ------- |
| HTTP/HTTPS | サポート                      | サポート    |
| HTTP/2     | サポート                      | サポート    |
| HTTP/3     | 未サポート                     | サポート    |
| TCP        | サポート                      | サポート    |
| UDP        | サポート                      | サポート    |
| WebSocket  | サポート                      | サポート    |
| Dubbo      | サポート                      | 未サポート   |

さらに、APISIX Ingress ControllerとTraefikのどちらも、HTTP/2プロキシやTCPプロキシを通じてgRPCやMQTTなどのプロトコルをサポートしているため、上記の表には記載していません。

プロトコルの観点から見ると、APISIX Ingress ControllerとTraefikのどちらにもそれぞれの強みがあります。APISIXは将来的にHTTP/3をサポートする予定です。

### 拡張性

多様なビジネスニーズに対応するため、拡張性は技術選定の重要な指標となっています。Apache IngressとTraefikの両方とも、それぞれの方法で機能拡張をサポートしています。それぞれ紹介します。

#### Apache APISIX Ingress Controller

APISIX Ingress Controllerの機能拡張は、カスタム[プラグイン](https://api7.ai/blog/how-to-build-an-apache-apisix-plugin-from-0-to-1)を実装することで実現されます。現在、主に以下の3つの方法でプラグインを開発できます：

- Luaを使用してプラグインを開発：この方法は比較的簡単で、パフォーマンスのコストがかかりません。
- `--plugin-runner`を使用してプラグインを開発：このモードでは、ユーザーはJAVA/Python/Goなどの異なるプログラミング言語を使用してプラグインを開発できるため、新しいプログラミング言語を学ぶことなく、現在のプロジェクトのロジックを活用できます。
- WASMモジュールを使用してプラグインを開発：このモードでは、WASMモジュールをビルドできる任意のプログラミング言語を使用してプラグインを開発できます。

さらに、サーバーレスプラグインを通じて直接Luaコードを記述することで、迅速にビジネスニーズを満たすこともできます。

もちろん、Luaモジュールの開発経験がある場合は、直接Luaモジュールを開発してロードすることもできますが、以下の設定を追加する必要があります：

```
apisix:
    ...
    extra_lua_path: "/path/to/example/?.lua"
```

詳細なプラグイン開発手順と使用方法については、[Apache APISIXプラグイン開発ドキュメント](https://apisix.apache.org/docs/apisix/plugin-develop/)と[APISIX Ingress Controllerがカスタムプラグインをサポートする方法](https://api7.ai/blog/how-does-apisix-ingress-support-custom-plugins)を参照してください。

#### Traefik

Traefikもプラグインメカニズムを提供して機能を拡張します。ただし、TraefikはGoで開発されているため、プラグインもGoで開発する必要があります。

開発したプラグインを参照するには、以下の内容をTraefikの設定に追加します。

```
experimental:
  localPlugins:
    example:
      moduleName: github.com/traefik/pluginproviderdemo
```

注意点として、プラグイン名はモジュール名と同じでなければなりません。

一般的に、APISIX Ingress Controllerは複数の拡張方法をサポートしており、ユーザーは実際の状況に応じて最適な方法を選択できます。さらに、ユーザーは好みの開発ツールを選択し、現在のビジネスラインとの統合を容易にすることができます。一方、TraefikはGolangのみを使用して開発できます。

### エコシステム

技術選定を行う際には、主にプロジェクトで使用されるプロトコル、プロジェクトの所有権、およびコントローラーを現在のインフラストラクチャに統合する方法を考慮します。

| 比較項目      | APISIX Ingress Controller       | Traefik      |
| --------- | ------------------------------- | ------------ |
| 所有権       | Apache Software Foundation（ASF） | Traefik Labs |
| プロトコル     | Apache 2.0                      | MIT          |
| 誕生時期      | 2019年6月                         | 2015年8月      |
| consul    | サポート                            | サポート         |
| nacos     | サポート                            | 未サポート        |
| Eureka    | サポート                            | 未サポート        |
| etcd      | サポート                            | サポート         |
| zookeeper | サポート                            | サポート         |
| DNS       | サポート                            | 未サポート        |

上記の比較には、コントロールプレーンとデータプレーンの両方の内容が含まれています。 さらに、これらの2つのプロジェクトは、RancherやKubeSphereなどの他のプロジェクトとの積極的な連携と統合を行っています。

この観点から見ると、Traefikと比較して、APISIXは基本コンポーネントとの統合能力が優れています。

技術選定を行う際には、使用している基本コンポーネントの長所と短所を考慮してください。

## ユーザーフィードバック（ユースケース）

[Horizon RoboticsはTraefikからApache APISIXに移行しました](https://api7.ai/blog/why-horizon-robotics-migrated-from-traefik-to-apche-apisix)。主に以下の点を考慮しました：

- Annotationを介して追加された設定を簡単に再利用できない。
- Traefikのデフォルトの動作がNGINXと異なるため、使用中にユーザーが混乱する。

HorizonがApache APISIX Ingress Controllerに切り替えた後、APISIX Ingress Controllerの豊富な拡張エコシステムのおかげで、ほとんどの要件は内部プラグインで実現できました。さらに、ユーザーはAPISIX Ingress ControllerのApisixRouteリソースを通じてプラグインの設定を直接定義できるため、非常に直感的です。また、ApisixPluginConfigを通じてプラグインモジュールの設定を構成し、他のApisixRouteリソースで参照することもできます。

![Horizonアーキテクチャ図](https://static.api7.ai/2022/09/22/632c658238630.png?imageMogr2/format/webp)

APISIX Ingress Controllerは優れたデータプレーンパフォーマンスを発揮し、増加するトラフィックを効率的に処理し、パフォーマンスのボトルネックを回避できます。

Horizon以外にも、[igetcool](http://www.igetcool.com/)や[gwwisdom](http://www.gwwisdom.com/)などの企業もAPISIX Ingress Controllerを使用してTraefikを置き換えています。詳細なクライアントユースケースについては、[ユースケース](https://api7.ai/category/usercase)を参照してください。

さらに、Apache APISIXは非常に活発なコミュニティを持ち、GithubやSlackなどのチャネルで迅速な対応と解決策を得ることができます。

## 結論

この記事では、Apache APISIX Ingress ControllerとTraefikをプロトコル、拡張性、エコシステムの観点から比較しました。

Apache Ingressは、拡張性とエコシステム統合の分野で一定の優位性を持っています。ユーザーはAPISIX Ingress Controllerの機能を拡張し、いくつかの基本コンポーネントとの統合をより効率的に行うことができます。

この記事が、Kubernetes Ingressコントローラーを選択する際の参考になれば幸いです。

Tags:

[APISIX Ingress Controller](https://api7.ai/tags/apisix-ingress-controller)

[Kubernetes](https://api7.ai/tags/kubernetes)

[Traefik](https://api7.ai/tags/traefik)

[Comparison to Competitors](https://api7.ai/tags/comparison-to-competitors)

Share article link

Share

Related Posts

[![如何在Apache APISIX Ingress Controller中代理外部服务](https://static.api7.ai/uploads/2024/12/24/WADOMxsJ_proxy-services-using-ingress-controller.png)](https://api7.ai/blog/proxy-services-in-apisix-ingress-controller)

## [如何在Apache APISIX Ingress Controller中代理外部服务](https://api7.ai/blog/proxy-services-in-apisix-ingress-controller)

[![APISIX Ingress ControllerでGateway APIを使用する方法](https://static.api7.ai/uploads/2024/09/06/jTbR13pX_Gateway%20API.png)](https://api7.ai/blog/how-to-use-gateway-api-in-apisix-ingress-controller)

## [APISIX Ingress ControllerでGateway APIを使用する方法](https://api7.ai/blog/how-to-use-gateway-api-in-apisix-ingress-controller)

Table of Contents

- [Apache APISIX Ingress Controllerとは？](#apache-apisix-ingress-controller%E3%81%A8%E3%81%AF)

- [Traefikとは？](#traefik%E3%81%A8%E3%81%AF)

- [比較](#%E6%AF%94%E8%BC%83)

  - [サポートされているプロトコル](#%E3%82%B5%E3%83%9D%E3%83%BC%E3%83%88%E3%81%95%E3%82%8C%E3%81%A6%E3%81%84%E3%82%8B%E3%83%97%E3%83%AD%E3%83%88%E3%82%B3%E3%83%AB)
  - [拡張性](#%E6%8B%A1%E5%BC%B5%E6%80%A7)
  - [エコシステム](#%E3%82%A8%E3%82%B3%E3%82%B7%E3%82%B9%E3%83%86%E3%83%A0)

- [ユーザーフィードバック（ユースケース）](#%E3%83%A6%E3%83%BC%E3%82%B6%E3%83%BC%E3%83%95%E3%82%A3%E3%83%BC%E3%83%89%E3%83%90%E3%83%83%E3%82%AF%E3%83%A6%E3%83%BC%E3%82%B9%E3%82%B1%E3%83%BC%E3%82%B9)

- [結論](#%E7%B5%90%E8%AB%96)

## Related Posts

[![なぜAPISIX Ingress ControllerはNGINX Ingress Controllerよりも優れているのか？](https://static.api7.ai/2023/01/05/63b6900e1d793.png)](https://api7.ai/ja/blog/apisix-ingress-vs-ingress-nginx)

Products

December 6, 2022

#### [なぜAPISIX Ingress ControllerはNGINX Ingress Controllerよりも優れているのか？](https://api7.ai/ja/blog/apisix-ingress-vs-ingress-nginx)

This article mainly compares the basic functionalities of APISIX Ingress and Ingress NGINX. APISIX Ingress is better than Ingress NGINX in terms of scalability, extensibility, and functionality.

[APISIX Ingress Controller](https://api7.ai/tags/apisix-ingress-controller)

[Kubernetes](https://api7.ai/tags/kubernetes)

[Traefik](https://api7.ai/tags/traefik)

[![なぜAPISIX Ingress ControllerはEmissary-ingressよりも優れた選択肢なのか？](https://static.api7.ai/uploads/2024/12/24/CLpj341F_apisix-ingress-controller-vs-emissary.png)](https://api7.ai/ja/blog/apisix-ingress-vs-emissary-ingress)

Products

March 17, 2023

#### [なぜAPISIX Ingress ControllerはEmissary-ingressよりも優れた選択肢なのか？](https://api7.ai/ja/blog/apisix-ingress-vs-emissary-ingress)

本記事では、APISIX Ingress ControllerとEmissary-ingressのパフォーマンスを、スケーラビリティやサービスディスカバリー統合など、複数の次元から比較しています。

[APISIX Ingress Controller](https://api7.ai/tags/apisix-ingress-controller)

[Kubernetes](https://api7.ai/tags/kubernetes)

[Emissary-Ingress](https://api7.ai/tags/emissary-ingress)

[![APISIX Ingress Controller 与 Service Discovery 集成](https://static.api7.ai/uploads/2024/12/25/yzN9mzLr_apisix-ingress-controller-service-discovery.png)](https://api7.ai/ja/blog/apisix-ingress-integrates-with-service-discovery)

Products

January 13, 2023

#### [APISIX Ingress Controller 与 Service Discovery 集成](https://api7.ai/ja/blog/apisix-ingress-integrates-with-service-discovery)

APISIX Ingress Controller 通过与服务发现（service discovery）集成，降低了微服务（microservices）的部署成本。

[APISIX Ingress Controller](https://api7.ai/tags/apisix-ingress-controller)

[Kubernetes](https://api7.ai/tags/kubernetes)

[Service Discovery](https://api7.ai/tags/service-discovery)
