SlideShare a Scribd company logo
1 of 27
Download to read offline
Date :
Presenter
:
ECSaaSからの脱却録〜ダイナミックレンダリング
やってみた〜
Naoya Tabakomori
アジェンダ
1.自己紹介/会社紹介
2.システムの概要
3.EC SaaS卒業までの経緯
4.新システムの構成の検討と運用
1.自己紹介/会社紹介
自己紹介
名前:煙草森直也 (たばこもり なおや)
各種アカウント:@sugaret
所属:ベースフード株式会社( VPoE)
ブログ:https://sugaret.hatenablog.com/
趣味:料理
会社紹介
ベースフード株式会社
「主食をイノベーションし、健康をあたりまえに」のミッションのもと、「完全栄養の主食」の開発・生産・販売
しています。現在はパスタ、パン、クッキーのバリエーションが存在しており、 2021年8月で累計1000万食
の販売を突破しました。
2.システムの概要
Appで利用している技術要素について
・PHP 7.4 / Laravel 6.2
・Nuxt.js 2.8
・MySQL 5.7
・Shopify
システム構成図
アプリケーションの一部を Shopifyに依存
・shop.basefood.co.jp で shopify
・payse.basefood.co.jp で 弊社app
システム構成図(コンテナまわり)
・リクエストを受けるサービスと、ワーカー
のサービスが立っている
deployのフロー
3.EC SaaS卒業までの経緯
どのようにShopifyを利用していたか
Shopifyを利用していたもの ・商品の紹介
・商品の選択
・商品登録
・注文管理(返金・キャンセルなど)
・配送システムとの連携
自社Appで解決していたもの ・選択された商品の金額計算
(クーポンや各種割引を含む)
・各種決済サービスとのつなぎ込み
・サブスク関連の機能
急転直下の規約変更
・外部アプリケーションを経由した決済を禁
止するお触れが出る
・弊社のAppは定期購買を行うために直接決
済代行サービスと連携を行っていた
・困った。。。
考えられうる3つの選択肢
選択肢 詳細
1.Shopifyが提供するサブスクへ
の移行
・規約変更の理由の大きいところは Shopifyが公式対応したから、
とのことだった。
・ただし、弊社の提供していた AmazonPayがサブスクだと使えな
いことが判明。NG。
2.Shopify以外のカートシステムへ
の移行
・いくつか話を聞いたが、 Shopifyレベルの自由度でやれるシステ
ムは見つけられなかった。加えて、かなりロックインされてしまう印
象があったため、微妙。。
3.自社Appですべてのシステムを
提供するように開発
・作る必要があるものはそこそこの量になるが、最終的には一番
システム改修の速度が上がるはず。柔軟な企画を実現するシステ
ム開発力を競争優位にできると考えて 採用した
(余談)Shopifyを利用するpros/cons
ありがたみ
・表示速度など、「ECサイト」として必要なポイントがしっかりチューンナップされていた
・さまざまなプラグインが存在しており、システム開発をせずとも利用できるものも多かった
つらみ
・基本的に海外製だったこともあり、プラグインも日本ローカライズなどを考えると自前で作る必要があるこ
とも多かった
・APIのレスポンスでエラーが帰ってくることがしばしばあり、レスポンスの内容だけでは原因を突き止めら
れず「時々落ちるもの」として利用する必要があった
・問い合わせは基本的に「フォーラムに書き込んでみんなで解決してね!」というスタンスで、技術者と相
談することができなかった
4.新システムの構成の検討と運用
(再掲)shopifyをどのように使っていたか
Shopifyを利用していたもの ・商品の紹介
・商品の選択
・商品登録
・注文管理(返金・キャンセルなど)
・配送システムとの連携
自社Appで解決していたもの ・選択された商品の金額計算
(クーポンや各種割引を含む)
・各種決済サービスとのつなぎ込み
・サブスク関連の機能
既存Appの拡張で作ろうとするも...
・自社AppはNuxt.jsをSPAモードで利用
・そのAppの延長として、商品の紹介/選択する箇所を開発しようとした
・が、SNSのbotはSPAを読んでくれない
- Google botは読んでくれるという説もあるっぽい?
・なんらか対応しないと。。
botがSPA読んでくれない問題
対応策を検討
選択肢 詳細
別Appに切り出す いちからAppを作るのも色々考えることがあるうえ、現状ある App
との連携、deployのフローを改修するなどがしんどそう
SSG、SSRのモードに切り替える Node.jsが動く環境を用意して、インフラまわりを大きく改修する必
要がある上、spaモード向けに書いた Nuxt.jsがそのまま動くとも思
えず。。かなりしんどそう
Dynamic Renderingする 現状のAppに手を加えず、botのためだけにいい感じに HTMLを返
せそう。ということで採用した
Dynamic Renderingってなに
・webサーバーがbot/クローラを判定し、クローラーに適したバージョンのコンテンツを配信すること。
・SPAをレンダリングした後の HTMLをcacheしておいて、それを返すなど。
・ブラウザの挙動をエミュレーションしてくれるダイナミックレンダラが存在する。
・今回はドキュメントも豊富だった Rendertronを採用
Rendertron
弊社でのつかいかた
・こちらで指定のbotに対してcacheしたHTMLを返すように
・cacheの対象のページもこちらで指定
- このあたりはnginx.confで指定
・cacheの有効期限はなし
・cache clearはdeployごとに行う
- invalidationのURLを叩きに行くscriptを実行
システム構成図(新)
・Shopifyの利用を停止
・Rendertronのserviceが追加され、botの
アクセスはそちらに流すように
deployのフロー(新)
・Rendertronのキャッシュを削除するフ
ローが追加された
ということで表示された!
気になりポイント
・cacheされていてもまだrenderingが遅いような気がする。。
・結局SEOスコアって落ちてないの?
- そもそもlight house scoreが全然高くない状態から、引き続き低いので判断つかず。。
- ただし、流入やCVRは特に変化がないので最悪の状態は避けられていると判断
- 速度改善は引き続きやっていく
以上です

More Related Content

Featured

AI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdfAI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdfmarketingartwork
 
PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024Neil Kimberley
 
Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)contently
 
How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024Albert Qian
 
Social Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsSocial Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsKurio // The Social Media Age(ncy)
 
Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Search Engine Journal
 
5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summarySpeakerHub
 
ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd Clark Boyd
 
Getting into the tech field. what next
Getting into the tech field. what next Getting into the tech field. what next
Getting into the tech field. what next Tessa Mero
 
Google's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentGoogle's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentLily Ray
 
Time Management & Productivity - Best Practices
Time Management & Productivity -  Best PracticesTime Management & Productivity -  Best Practices
Time Management & Productivity - Best PracticesVit Horky
 
The six step guide to practical project management
The six step guide to practical project managementThe six step guide to practical project management
The six step guide to practical project managementMindGenius
 
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...RachelPearson36
 
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...Applitools
 
12 Ways to Increase Your Influence at Work
12 Ways to Increase Your Influence at Work12 Ways to Increase Your Influence at Work
12 Ways to Increase Your Influence at WorkGetSmarter
 

Featured (20)

AI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdfAI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
 
Skeleton Culture Code
Skeleton Culture CodeSkeleton Culture Code
Skeleton Culture Code
 
PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024
 
Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)
 
How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024
 
Social Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsSocial Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie Insights
 
Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024
 
5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary
 
ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd
 
Getting into the tech field. what next
Getting into the tech field. what next Getting into the tech field. what next
Getting into the tech field. what next
 
Google's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentGoogle's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search Intent
 
How to have difficult conversations
How to have difficult conversations How to have difficult conversations
How to have difficult conversations
 
Introduction to Data Science
Introduction to Data ScienceIntroduction to Data Science
Introduction to Data Science
 
Time Management & Productivity - Best Practices
Time Management & Productivity -  Best PracticesTime Management & Productivity -  Best Practices
Time Management & Productivity - Best Practices
 
The six step guide to practical project management
The six step guide to practical project managementThe six step guide to practical project management
The six step guide to practical project management
 
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
 
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
 
12 Ways to Increase Your Influence at Work
12 Ways to Increase Your Influence at Work12 Ways to Increase Your Influence at Work
12 Ways to Increase Your Influence at Work
 
ChatGPT webinar slides
ChatGPT webinar slidesChatGPT webinar slides
ChatGPT webinar slides
 
More than Just Lines on a Map: Best Practices for U.S Bike Routes
More than Just Lines on a Map: Best Practices for U.S Bike RoutesMore than Just Lines on a Map: Best Practices for U.S Bike Routes
More than Just Lines on a Map: Best Practices for U.S Bike Routes
 

EC SaaSからの脱却記〜ダイナミックレンダリングやってみた〜