Bucketeer Lite: 軽量環境(Fly.ioまたはAWS)でのフィーチャーフラグ管理システムの実行
CyberAgentのBucketeerチームは、オープンソースの機能フラグ・A/Bテストプラットフォーム「Bucketeer」の軽量版を公開し、Google Cloud依存を解消してFly.ioやAWS Fargateで低コスト実行可能にしたことを発表した。
キーポイント
Bucketeer Liteの開発背景
標準版はGoogle Cloud上で月300ドル以上のコストがかかり、評価段階のチームや小規模アプリケーションには参入障壁が高かったため、よりアクセスしやすい軽量版を開発した。
主要な技術的変更点
イベントパイプラインにCloud Pub/Subの代わりにRedis Streamsを採用し、データウェアハウスにBigQueryの代わりにMySQL/PostgreSQLをサポートすることで、Google Cloudアカウント不要で任意のコンテナプラットフォームで実行可能になった。
対応プラットフォームと展開
Fly.io(軽量VM上のグローバルネットワークPaaS)とAWS Elastic Container Service Fargate(サーバーレスコンテナプラットフォーム)の2つのプラットフォーム向けにデプロイスクリプトを用意した。
Bucketeerの機能と価値
機能フラグ管理とA/Bテストを単一プラットフォームで実現し、段階的ロールアウト、ベイジアン推論を用いたA/Bテスト、キルスイッチ、ターゲットリリース、自動運用などの有用なパターンをサポートする。
Fly.ioとAWSのアーキテクチャ比較
Fly.ioでは各サービスが軽量VM(Fly Machine)で実行され、プライベートWireGuardネットワークを介して通信し、APIはエニーキャストIPでグローバルに分散される。AWSではECS Fargateタスクがパブリックサブネットで実行され、ALBがエントリーポイントとなり、サービスはAWS Cloud Mapで相互発見する。
コスト比較
Fly.ioの推定月額コストは約34USD、AWS ECS Fargateの推定月額コストは約88USD(us-east-1)で、AWS Free Tierを利用すると最初の12ヶ月は約61USDに削減可能。
Lite版の制限とスケーリング
Lite版は小規模チーム向けで、高トラフィック時には内部SaaS版または標準版への移行が推奨されている。スケーリングはステートレスなAPIサービスを水平スケールすることで対応可能。
影響分析・編集コメントを表示
影響分析
この発表は、機能フラグ管理とA/Bテストの民主化を進める重要な一歩であり、中小規模の開発チームやスタートアップでも本格的な機能フラグ管理を低コストで導入できる可能性を開いた。また、クラウドベンダー依存からの脱却を示すことで、オープンソースツールの普及促進とエコシステムの多様化に貢献する。
編集コメント
オープンソースの機能フラグ管理ツールがクラウドベンダー依存から脱却し、より広範な開発者コミュニティにアクセス可能になった点が注目に値する。実践的なデプロイガイドとともに提供されることで、実際の導入ハードルが大幅に下がっている。
こんにちは、CyberAgent Hanoi Dev Center の Bucketeer チームのバックエンドエンジニアです。Bucketeer は、AbemaTV を含む CyberAgent のサービスで長年使用されているオープンソースのフィーチャーフラグおよび A/B テストプラットフォームです。この記事では、2 つの異なるプラットフォームで実行する方法を紹介します:
Fly.io – 軽量 VM のグローバルネットワーク上でコンテナ化アプリケーションを実行する PaaS。
AWS Elastic Container Service Fargate – サーバーレスコンテナプラットフォーム。
Bucketeer の機能
フィーチャーフラグを使用すると、アプリケーションを再デプロイすることなく、どのユーザーがどのバージョンの機能を利用するかを制御できます。最も単純な形では、「ユーザーの 10% に機能 X を表示する」といった条件分岐です。実際には、以下のような有用なパターンを実現します:
- 段階的ロールアウト – ユーザーの 1% にリリースし、エラーを監視してから徐々に 100% に拡大
- A/B テスト – 2 つのバリアント間でトラフィックを分割し、ベイズ推論を使用してどちらがより良いパフォーマンスを示すかを測定
- キルスイッチ – デプロイをロールバックせずに機能を即座に無効化
- ターゲットリリース – 内部ユーザー、ベータテスター、または特定のセグメントに最初にリリース
- 自動運用 – カスタムメトリクスに基づいてロールアウトを自動的にロールバックまたは進行
Bucketeer は単一のプラットフォームでこれらすべてをサポートします。様々な言語やフレームワーク (iOS、Android、React を使用した Web フロントエンド、Golang、NodeJS を使用したサーバーなど) 向けの SDK が利用可能です。アプリケーションは SDK を呼び出してフラグを評価し、プラットフォームがターゲティング、スケジューリング、実験追跡を処理します。
標準デプロイメントとそのコスト
標準的な Bucketeer デプロイメントは Google Cloud 上で実行されます: オーケストレーションに GKE、サービス間のイベントストリーミングパイプラインに Cloud Pub/Sub、実験データウェアハウスに BigQuery を使用します。これは堅牢な本番環境設定ですが、約 300 米ドル/月の基本コストがかかります。Pub/Sub と BigQuery はどちらも使用量に応じて課金されるため、イベント量に応じてコストは増加します。
Bucketeer を評価しているチームや、小規模なアプリケーションを実行しているチームにとって、この参入障壁は高くなります。また、そもそも Google Cloud を利用している必要があります。
Lite バージョン
私たちは Bucketeer を Google Cloud 以外でも利用可能にしたいと考え、標準的なコンテナプラットフォーム上で実行するように設計された Lite バージョンを構築しました。標準デプロイメントとの主な違いは次のとおりです:
- イベントパイプラインは Cloud Pub/Sub の代わりに Redis Streams を使用
- データウェアハウスは、実験分析用に BigQuery の代替として MySQL または PostgreSQL をサポート
これらの変更により、Bucketeer は Google Cloud アカウントを必要とせず、コンテナをホストできる任意のプラットフォーム上で実行できます。
私たちは 2 つのオプションのデプロイメントスクリプトを用意しました。すべての価格は米ドル/月で、24/7 稼働を想定しています。
両方のデプロイメントは同じサービスを実行します。Nginx はブラウザトラフィックを Web (コンソールと管理 API) に、SDK 呼び出しを API (フラグ評価) にルーティングします。Subscriber は Redis Streams からイベントを消費し、結果を MySQL に書き込みます。Batch はスケジュールされたジョブ (ロールアウト進行、実験評価、自動運用) を実行し、ベイズ的有意性計算のために HTTPStan を呼び出します。Batch-Cron はスケジュールに従って Batch をトリガーします。Migrations は Atlas を使用したワンショットタスクとして実行されます。
主な違いはインフラストラクチャです。
- Fly.io の場合、各サービスは Fly Machine として実行されます。これはミリ秒で起動し、実行中のみ課金される軽量 VM です。同じ組織内のマシンはプライベート WireGuard ネットワークを共有し、
*.internalDNS を介して到達可能なため、サービスは公開されることなく相互に通信します。API は独自のエニーキャスト IP を取得します: 複数のリージョンにマシンをデプロイすると、Fly.io は各 SDK クライアントを最も近いマシンに自動的にルーティングします。Redis は Upstash によって管理され、各サービス上のローカル socat プロキシがパスワード認証を処理します。MySQL は永続ボリュームを持つ Fly Machine 上で実行されます。 - AWS の場合、Application Load Balancer が単一のエントリーポイントであり、Nginx に転送します。アプリケーションサービスはパブリックサブネット内の ECS Fargate タスクとして実行されます – NAT Gateway は不要です。サービスは AWS Cloud Map (
*.bucketeer.local) を介して相互を発見します。MySQL と Redis はプライベートサブネット内の RDS と ElastiCache 上で実行されます。シークレットはコンテナ起動時に SSM Parameter Store から注入されます。
Fly.io アーキテクチャ

Fly.io ~34 米ドル/月
推定コスト (米ドル)
- shared-1x, 1024 MB
- shared-1x, 512 MB
- shared-1x, 256 MB
- shared-1x, 256 MB
- shared-1x, 256 MB
- shared-1x, 256 MB
- shared-1x, 256 MB
- shared-1x, 256 MB
- 2x IPv4 (nginx + api)
AWS アーキテクチャ

AWS ECS Fargate ~88 米ドル/月 (us-east-1)
推定コスト (米ドル)
- ECS Fargate (Nginx) – 0.25 vCPU, 512 MB
- ECS Fargate (API) – 0.25 vCPU, 512 MB
- ECS Fargate (Web) – 0.25 vCPU, 512 MB
- ECS Fargate (Batch) – 0.25 vCPU, 512 MB
- ECS Fargate (Subscriber) – 0.25 vCPU, 512 MB
- db.t3.micro, 20 GB
- ElastiCache Redis
- 無効 – ECS タスクは
assign_public_ip=trueでパブリックサブネットを使用
AWS Free Tier (最初の 12 ヶ月): RDS と ElastiCache は無料です (特定の条件に基づきます。詳細は AWS の料金プランウェブサイトをご確認ください)。これによりコストは約 61 米ドル/月になります。
Bucketeer でのフィーチャーフラグの使用
デプロイ前にプラットフォームの感触を得たい場合、Bucketeer デモサイトでは、フィーチャーフラグ、段階的ロールアウトなどをサンドボックス環境で試すことができます – インフラ設定は不要で、Google アカウントでサインインするだけです。
デプロイ後は、Web コンソールと SDK を介して Bucketeer と対話します。
フラグの作成は簡単です – 名前を付け、タイプ (ブール値、文字列、数値、または JSON) を選択し、デフォルト値を設定します。そこからターゲティングルールの設定、ロールアウトのスケジュール設定、または実験への関連付けができます。
ロールアウトでは、フラグバリエーションを受け取るユーザーの割合を徐々に増やすことができます。初期割合とスケジュールを設定すると、Bucketeer が自動的に進行させます。
実験では、2 つ以上のフラグバリエーション間でトラフィックを分割し、目標イベント (クリック、コンバージョン、カスタムメトリクス) を追跡します。プラットフォームはベイズモデルを使用して統計的有意性を決定するため、事前に固定サンプルサイズを設定する必要はありません。
自動運用は特に興味深い部分です。「治療群のユーザーのエラー率が 1% を超えた場合、フラグを自動的にロールバックする」などのルールを定義します。これにより、フィーチャーフラグは安全層 – 自動サーキットブレーカーを備えた段階的デリバリー – に変わります。
これらは各デプロイオプションのコンピュート仕様に基づいた大まかな推定値です。API サービス (SDK フラグ評価) は主要なスループットの懸念点です – フラグを評価するアプリケーション内のすべてのリクエストで呼び出されます。
- Fly.io (shared-cpu-1x)
- AWS (0.25 vCPU Fargate)
- フラグ評価 – キャッシュヒット
- フラグ評価 – キャッシュミス (DB 読み取り)
- イベント取り込み (Redis Streams 書き込み)
- 管理 API (Web コンソール)
ほとんどのチームにとってこれは十分です。SDK は評価結果をローカルにキャッシュするため、API はすべてのページロードで呼び出されるわけではありません – SDK の初期化時と定期的な更新時のみです。数十万の日次アクティブユーザーを持つアプリケーションは、通常、フラグ評価の RPS (1 秒あたりのリクエスト数) が 100 を大幅に下回ります。
注意すべきボトルネック:
- MySQL コネクションプール – 両方のデプロイメントは 50 のオープン接続を設定します。デフォルトインスタンスサイズ (AWS の db.t3.micro、Fly.io の shared-1x) では、MySQL は約 500–800 の単純なクエリ/秒で飽和します。
- Upstash Redis レイテンシ – Upstash はリモート管理サービスです (往復約 1–3 ミリ秒、ローカル ElastiCache は約 0.1 ミリ秒)。これは AWS デプロイメントと比較して、キャッシュを多用するパスのスループットを制限します。
- Fly.io 共有 CPU – shared-cpu-1x はバースト可能であり、保証された割り当てではありません。持続的な高トラフィックはスロットリングされる可能性があります。
より多くの容量が必要な場合、水平スケーリングは簡単です。API サービスはステートレスです – Fly.io では fly scale count 2 -a bucketeer-api、AWS では ECS の desired count を調整します。追加インスタンスごとにほぼ同じスループットが追加されます。
Lite デプロイメントが快適に処理できる範囲を超えるトラフィックがある場合、内部 SaaS オプション (CyberAgent チーム向け) または本番規模向けに設計された Google Cloud 上の標準 Bucketeer デプロイメントのいずれかを推奨します。
Lite バージョンに含まれないもの
- イベントパイプライン – 標準バージョンは Cloud Pub/Sub を使用します。これは完全管理型で、高スループット、グローバル分散イベントストリーミング向けに設計されています。Lite バージョンはこれを Redis Streams に置き換えます。これは中規模ではうまく機能しますが、Pub/Sub の耐久性保証や、バックプレッシャーなしでより高いイベント量を処理する能力には及びません。例えば、1 秒あたり 10000 または数百万ものイベントが予想される場合、またはイベント損失なしの保証配信が必要な場合、Cloud Pub/Sub がより適しています。
- データウェアハウス – すべてのフラグ評価はイベントを生成し、使用統計としてコンソールに保存・表示されます。標準バージョンはこれに BigQuery を使用します。Lite バージョンは MySQL または PostgreSQL を使用します – ほとんどのチームに適していますが、イベントテーブルが数億行に達すると、コンソール統計を支える集計クエリの速度が顕著に低下します。BigQuery はこの種の読み取りのために構築されており、数十億行を数秒で処理します。Lite デプロイメントを離れずにより多くの余裕が必要な場合、TimescaleDB も Lite バージョンに実装されています – これは時系列データ向けに特別に構築された PostgreSQL 拡張機能であり、自動パーティショニングと圧縮を介して、プレーンな PostgreSQL や MySQL よりも大幅に大規模な集計を処理します。
高可用性と可観測性もデフォルトでは設定されていません – Lite デプロイメントは各サービスの単一インスタンスを実行し、stdout にログを出力します。ただし、各サービスは使用要件に基づいてスケールアップできます。
始め方
デプロイメントスクリプトは github.com/bucketeer-io/bucketeeraform で利用可能です。リポジトリには、Fly.io と AWS の両方のセットアップ手順を含む README.md が含まれています。全体のプロセスは、クローンから実行中の Web コンソールまで約 10–15 分かかります。
Bucketeer を評価中、または Google Cloud 外で実行したい場合、これは妥当な出発点となります。コントリビューションとフィードバックを歓迎します。
CyberAgent 内での Bucketeer の利用
CyberAgent のチームで、自社のインフラストラクチャを管理したくない場合は、Bucketeer を内部 SaaS としても提供しています。Bucketeer チームが CyberAgent 内でプラットフォームをホスト・運用するため、セットアップなしですぐにフィーチャーフラグの使用を開始できます。直接お問い合わせください。
原文を表示
Hi, I’m a backend engineer on the Bucketeer team at CyberAgent Hanoi Dev Center. Bucketeer is our open-source feature flag and A/B testing platform, used by CyberAgent services including AbemaTV for years. In this post I want to share a way to run it on two different platform:
Fly.io – a PaaS that runs containerized applications on a global network of lightweight VMs.
AWS Elastic Container Service fargate, a serverless container platform.
What Bucketeer does
Feature flags let you control which users see which version of a feature — without redeploying your application. At their simplest, they’re a conditional: “show feature X to 10% of users.” In practice, they unlock a lot of useful patterns:
Progressive rollouts — release to 1% of users, watch for errors, then gradually expand to 100%
A/B testing — split traffic between two variants and measure which performs better, using Bayesian inference
Kill switches — disable a feature instantly without rolling back a deployment
Targeted releases — release to internal users, beta testers, or specific segments first
Auto-ops — automatically roll back or progress a rollout based on custom metrics
Bucketeer supports all of these through a single platform. SDKs are available across various languages and frameworks (iOS, Android, Web Frontend with React, Server with Golang, NodeJS, …); your application calls the SDK to evaluate a flag, and the platform handles targeting, scheduling, and experiment tracking.
The standard deployment and its cost
The standard Bucketeer deployment runs on Google Cloud: GKE for orchestration, Cloud Pub/Sub for the event streaming pipeline between services, and BigQuery as the experiment data warehouse. This is a solid production setup, but it comes with a baseline cost of around 300 USD/month — and that number grows with event volume, since Pub/Sub and BigQuery are both billed per use.
For teams evaluating Bucketeer, or running smaller applications, that entry point is high. It also means you need to be on Google Cloud in the first place.
The lite version
We wanted to make Bucketeer accessible beyond Google Cloud, so we built a lite version designed to run on standard container platforms. The key differences from the standard deployment are:
The event pipeline uses Redis Streams instead of Cloud Pub/Sub
The data warehouse supports MySQL or PostgreSQL as alternatives to BigQuery for experiment analytics
With these changes, Bucketeer runs on any platform that can host containers, with no Google Cloud account required.
We put together deployment scripts for two options. All prices in USD/month, assuming 24/7 uptime.
Both deployments run the same services. Nginx routes browser traffic to Web (console and management API) and SDK calls to API (flag evaluation). Subscriber consumes events from Redis Streams and writes results to MySQL. Batch runs scheduled jobs — rollout progression, experiment evaluation, auto-ops — and calls HTTPStan for Bayesian significance calculations. Batch-Cron triggers Batch on a schedule. Migrations run as a one-shot task using Atlas.
The key difference is infrastructure. On Fly.io, each service runs as a Fly Machine — a lightweight VM that starts in milliseconds and is billed only while running. Machines in the same organization share a private WireGuard network, reachable via *.internal DNS, so services talk to each other without any public exposure. The API gets its own anycast IP: when you deploy machines in multiple regions, Fly.io automatically routes each SDK client to the nearest one. Redis is managed by Upstash, with a local socat proxy on each service to handle password authentication. MySQL runs on a Fly Machine with a persistent volume.
On AWS, an Application Load Balancer is the single entry point, forwarding to Nginx. Application services run as ECS Fargate tasks in public subnets — no NAT Gateway needed. Services discover each other via AWS Cloud Map (*.bucketeer.local). MySQL and Redis run on RDS and ElastiCache in private subnets. Secrets are injected from SSM Parameter Store at container startup.
Fly.io architecture

Fly.io ~34 USD/month
Est. cost (USD)
shared-1x, 1024 MB
shared-1x, 512 MB
shared-1x, 256 MB
shared-1x, 256 MB
shared-1x, 256 MB
shared-1x, 256 MB
shared-1x, 256 MB
shared-1x, 256 MB
2x IPv4 (nginx + api)
AWS architecture

AWS ECS Fargate ~88 USD/month (us-east-1)
Est. cost (USD)
ECS Fargate (Nginx)
0.25 vCPU, 512 MB
ECS Fargate (API)
0.25 vCPU, 512 MB
ECS Fargate (Web)
0.25 vCPU, 512 MB
ECS Fargate (Batch)
0.25 vCPU, 512 MB
ECS Fargate (Subscriber)
0.25 vCPU, 512 MB
db.t3.micro, 20 GB
ElastiCache Redis
disabled — ECS tasks use public subnets with assign_public_ip=true
AWS Free Tier (first 12 months): RDS and ElastiCache are free (on specific condition, please check the AWS pricing plan website for more detail), bringing cost to ~61 USD/month.
Using feature flags with Bucketeer
If you want to get a feel for the platform before deploying, the Bucketeer demo site lets you try out feature flags, progressive rollouts, and more in a sandbox environment — no infrastructure setup needed, just sign in with a Google account.
Once deployed, you interact with Bucketeer through its web console and SDKs.
Creating a flag is straightforward — give it a name, choose a type (boolean, string, number, or JSON), and set the default value. From there you can configure targeting rules, schedule a rollout, or attach it to an experiment.
Rollouts let you gradually increase the percentage of users who receive a flag variation. You set the initial percentage and the schedule, and Bucketeer advances it automatically.
Experiments split traffic between two or more flag variations and track goal events (clicks, conversions, custom metrics). The platform uses a Bayesian model to determine statistical significance, so you don’t need to set a fixed sample size upfront.
Auto-ops is where things get interesting. You define rules like: “if the error rate for users in the treatment group exceeds 1%, roll back the flag automatically.” This turns your feature flags into a safety layer — progressive delivery with an automatic circuit breaker.
These are rough estimates based on the compute specs of each deployment option. The API service (SDK flag evaluations) is the main throughput concern — it is called on every request in your application that evaluates a flag.
Fly.io (shared-cpu-1x)
AWS (0.25 vCPU Fargate)
Flag evaluation – cache hit
Flag evaluation – cache miss (DB read)
Event ingestion (Redis Streams writes)
Management API (web console)
For most teams this is sufficient. SDKs cache evaluation results locally, so the API is not called on every page load — only on SDK initialization and periodic refresh. An application with hundreds of thousands of daily active users typically generates well under 100 RPS of flag evaluations.
Bottlenecks to be aware of:
MySQL connection pool — both deployments configure 50 open connections. At the default instance size (db.t3.micro on AWS, shared-1x on Fly.io), MySQL saturates around 500–800 simple queries per second.
Upstash Redis latency — Upstash is a remote managed service (~1–3 ms round trip vs ~0.1 ms for local ElastiCache). This caps throughput on cache-heavy paths compared to the AWS deployment.
Fly.io shared CPU — shared-cpu-1x is burstable, not a guaranteed allocation. Sustained high traffic may be throttled.
Scaling horizontally is straightforward if you need more capacity. The API service is stateless — on Fly.io it’s fly scale count 2 -a bucketeer-api, and on AWS it’s adjusting the ECS desired count. Each additional instance adds roughly the same throughput.
If your traffic exceeds what the lite deployment can comfortably handle, we recommend either the internal SaaS option (for CyberAgent teams) or the standard Bucketeer deployment on Google Cloud, which is designed for production scale.
What the lite version doesn’t include
Event pipeline – the standard version uses Cloud Pub/Sub, which is fully managed and designed for high-throughput, globally distributed event streaming. The lite version replaces it with Redis Streams, which works well at moderate scale but does not match Pub/Sub’s durability guarantees or its ability to handle much higher event volumes without back pressure. For example if we expect 10000 or even up to millions of events per second, or if we need guaranteed delivery without event loss, cloud Pub/Sub is the better fit.
Data warehouse – every flag evaluation generates an event that is stored and shown in the console as usage statistics. The standard version uses BigQuery for this. The lite version uses MySQL or PostgreSQL — suitable for most teams, but aggregation queries that power the console stats slow down noticeably once the events table reaches hundreds of millions of rows. BigQuery is built for this kind of read and handles billions of rows in seconds. If you need more headroom without leaving the lite deployment, TimescaleDB is also implemented in the lite version — it is a PostgreSQL extension purpose-built for time-series data, and handles large-scale aggregations significantly better than plain PostgreSQL or MySQL through automatic partitioning and compression.
High availability and observability are also not configured out of the box — the lite deployment runs a single instance of each service and logs to stdout. However, each service can be scaled up based on usage requirements.
Getting started
The deployment scripts are available at github.com/bucketeer-io/bucketeeraform. The repository includes a README.md with setup instructions for both Fly.io and AWS. The whole process takes about 10–15 minutes from clone to running web console.
If you’re evaluating Bucketeer or want to run it outside of Google Cloud, this is a reasonable starting point. Contributions and feedback are welcome.
Using Bucketeer inside CyberAgent
If you are a CyberAgent team and prefer not to manage your own infrastructure, we also offer Bucketeer as an internal SaaS. The Bucketeer team hosts and operates the platform within CyberAgent, so you can start using feature flags right away without any setup. Feel free to reach out to us directly.
関連記事
[AINews] 今日は何も大きな出来事はありませんでした
Anthropic が RSI の兆候を示し、OpenAI の ChatGPT が月間アクティブユーザー数で 10 億人を突破。SpaceX AI は IPO について説明しているが、最も重要なのは AIE WF のチケット確保とイベント参加である。
Vite 開発元 VoidZero が Cloudflare に参画
Vite や Vitest を開発する企業「VoidZero」がクラウドプロバイダー「Cloudflare」に合流し、同社全従業員も Cloudflare の一員となる。ただし、主要プロジェクトは引き続きオープンソースとして運営される方針を示した。
Google の新モデル「Gemma 4 12B」は 16GB RAM のノート PC で動作可能に設計
Google は、メモリ消費を抑えた新しい生成 AI モデル「Gemma 4 12B」を発表した。このモデルは、一般的な消費者向けノートパソコン(RAM 16GB)でも実行できるように最適化されており、ローカルでの AI 利用を促進するものである。