pixivの画像配信基盤 — 数億イラストを世界に届ける技術

pixivは2007年に誕生したイラスト投稿サイトであり、現在では累計作品数が1億を超え、登録ユーザーは7000万に達しています。これだけの規模の画像を世界中に安定して届けるため、同社は専用の画像配信基盤を構築しています。
pixiv is an illustration-posting site launched in 2007. Its cumulative work count now exceeds 100 million, and registered users have reached 70 million. To deliver images at this scale stably to a worldwide audience, the company has built a dedicated image-delivery platform.
Fastlyとの提携
pixivは長年、米国のCDN事業者Fastlyと提携し、全世界に配置されたエッジサーバーから画像を配信しています。Fastlyの特徴は、VCL(Varnish Configuration Language)による柔軟な制御と、即時キャッシュパージにあります。新作が投稿された瞬間から数秒で全世界のエッジに配信される仕組みです。
For many years pixiv has partnered with the US-based CDN vendor Fastly, delivering images from edge servers deployed worldwide. Fastly's strengths are flexible control via VCL (Varnish Configuration Language) and instant cache purging. The mechanism delivers a newly submitted work to edges around the world within a few seconds of posting.
WebP・AVIFへの対応
イラストは一般の写真と比べ、平坦な色領域が多く、圧縮効率が高いという特性があります。pixivはJPEG・PNGに加え、WebPおよびAVIF形式にも対応しており、ブラウザの`Accept`ヘッダを見て最適な形式をエッジで選択します。AVIFは同等画質でJPEGの半分以下の容量に収まるため、転送量と読み込み時間を大幅に削減できます。
Compared to typical photos, illustrations have many flat color regions, giving them high compression efficiency. In addition to JPEG and PNG, pixiv supports WebP and AVIF, with the edge selecting the optimal format based on the browser's Accept header. Because AVIF fits equivalent visual quality into less than half the size of JPEG, it significantly reduces both transfer volume and load time.
年齢制限コンテンツのCDN戦略
pixivには一般作品と並んで、R-18と呼ばれる成人向けコンテンツが多数投稿されています。これらは未成年や未ログインユーザーには配信してはなりません。エッジサーバーはCookieと認証トークンを検査し、年齢確認済みのユーザーにのみオリジンサーバーへ転送します。未認証リクエストはエッジで即座に拒否され、オリジンに負荷をかけません。
Alongside general works, pixiv hosts a large amount of adult content known as R-18. These must not be delivered to minors or logged-out users. Edge servers inspect cookies and authentication tokens, forwarding to the origin only for users who have completed age verification. Unauthenticated requests are rejected immediately at the edge, avoiding any load on the origin.
オンザフライリサイズ
同じ作品でも、サムネイル、一覧表示、詳細表示、拡大表示など用途に応じて多数のサイズが必要です。pixivはアップロード時に全サイズを事前生成するのではなく、URLにサイズ指定を含め、エッジで初回リクエスト時にリサイズして結果をキャッシュします。これにより使われないサイズの生成コストを回避し、新しい端末解像度にも即座に対応できます。
Even for the same work, many sizes are required depending on the use case — thumbnails, list views, detail views, full-size views, and so on. Rather than pre-generating all sizes at upload time, pixiv encodes the size specification into the URL and resizes at the edge on the first request, then caches the result. This avoids the cost of generating unused sizes and instantly supports new device resolutions.
著作権保護と透かし
投稿された作品が無断で転載されることを防ぐため、pixivは一部の配信経路で半透明の透かしを画像に合成しています。特に未ログインユーザーや海外IPからのアクセスに対しては、作者名とpixivロゴを薄く重ねたバージョンを返すことで、スクレイピングへの抑止としています。
To prevent posted works from being reposted without permission, pixiv composites a semi-transparent watermark onto images on certain delivery paths. Particularly for logged-out users and accesses from overseas IPs, the platform returns a version with the author's name and the pixiv logo lightly overlaid, serving as a deterrent against scraping.
新UI「アンティーク」プロジェクト
2010年代後半、pixivは「アンティーク」と呼ばれる大規模UI改善プロジェクトを実施しました。これに伴い、従来の固定サイズ画像URLは廃止され、レスポンシブな多解像度URLへ移行しました。既存URLとの互換を保つため、エッジで古いURLを新しいURLへ内部的に書き換えるリダイレクト層が追加されています。
In the latter half of the 2010s, pixiv carried out a large-scale UI overhaul project called "Antique." With this, the conventional fixed-size image URLs were abolished and migrated to responsive multi-resolution URLs. To maintain compatibility with existing URLs, a redirect layer was added at the edge that internally rewrites old URLs into new ones.
モバイルアプリへのファーストパーティ対応
pixivの公式iOS/Androidアプリは、ブラウザとは別の配信最適化を受け取っています。端末情報に基づき、Retina相当の端末には2倍解像度を、低速回線には低ビットレートAVIFを配信するなど、端末特性に応じた出し分けをエッジで行います。
pixiv's official iOS/Android apps receive delivery optimizations distinct from those for browsers. Based on device information, the edge differentiates serving — sending 2x resolution to Retina-class devices, low-bitrate AVIF to slow networks, and so on, tailored to device characteristics.
海外展開とローカライズURL
pixivは韓国、台湾、中国などアジア圏で強い人気を誇り、それぞれの地域に最適化されたCDNエッジを活用しています。韓国向けには国内ISPとのピアリングが強化されたエッジを、中国本土向けには現地の法的要件に適合したパートナーCDNを使い分けるなど、地域ごとの最適経路を実現しています。
pixiv enjoys strong popularity in Asian regions including Korea, Taiwan, and China, leveraging CDN edges optimized for each region. For Korean users, edges with strengthened peering with domestic ISPs are used; for mainland China, partner CDNs that comply with local legal requirements are used. By selectively applying these, pixiv achieves optimal regional routing.
今後の展望
pixivは今後、動画作品や3Dモデルなど画像以外のメディアにも配信基盤を拡張する計画です。また、生成AIによる類似画像検索や、エッジでの著作権侵害検知にも取り組み、クリエイターを守りながら作品を世界に届ける基盤を目指しています。
Going forward, pixiv plans to extend its delivery platform beyond images to media such as video works and 3D models. The company is also working on similarity search powered by generative AI and on edge-based copyright-infringement detection, aiming for a platform that delivers works to the world while protecting creators.