SlideShare une entreprise Scribd logo
1  sur  21
Télécharger pour lire hors ligne
March 2014
Case Study: Using WSO2 API
Manager to deliver dynamic
display advertising
Chuck Megivern
Senior Software Engineer
MyWebGrocer, Inc.
cmegivern@mywebgrocer.com
May 2014
March 2014
Chuck Megivern is a Senior Software Engineer for MyWebGrocer, Inc.
He is the company technical lead for open source technologies. Chuck has been
developing advertising applications for MyWebGrocer and before that, Dealer.com,
for the last five years.
He has delivered Display Advertising, SEM, SEO and Digital Video applications and
APIs. He has also delivered multiple cloud based server deployments.
Earlier in his career, Chuck developed software for IBM and also had a number of
engineering assignments there.
Chuck has a BSEE degree from Lehigh University, and an MSEE degree from
Syracuse University.
About the author
March 2014
• MyWebGrocer (MWG) was founded in 1999.
• We serve the grocery industry and consumer packaged goods industry.
• We provide an online grocery platform used by leading retailers
encompassing over 10,000 retail locations in the US.
• Expanding in Asia Pacific and Europe.
• We also have extensive eCommerce and eMarketing solutions.
• We provide digital display advertising on our own ad network, as well as on
public internet sites that participate in other online ad networks, such as
Google DoubleClick.
• My area provides APIs for internal company use, and for external business
partners.
Introducing MyWebGrocer
March 2014
• Our case study involves using WSO2 API Manager to enrich display advertising served to
consumers via the Google DoubleClick ad network.
• The ad network delivers an Adobe Flash based Rich Media ad to consumer’s desktops while
they are browsing internet sites.
• The ad campaign lasts for a number of weeks. The Rich Media ad, using Action Script,
calls a MWG API and dynamically pulls in data every time the ad is displayed.
• The API delivers product information that updates daily. That data
• comes from the retailer’s store that is closest to the consumer, and
• is currently advertising the products of interest.
• Most consumer advertising application use cases involve responding to a consumers 'click'
expressing interest.
• However, this high traffic use case invokes the API every time that a display ad is
presented to a consumer.
• This presentation discusses our technical approach and application stack used to handle
this high volume.
Our case study
March 2014
WSO2 Product Usage
• Case study usage
• API Manager 1.5
• Business Activity Monitor (BAM) 2.4.0
• Current Usage
• API Manager 1.6
• Business Activity Monitor (BAM) 2.4.1
Types of APIs served
• Case study: very high volume consumer browser API invokations.
• At the same time, this distributed API manager installation serves:
• external business partners using MWG API’s
• internal MWG servers invoking MWG API’s
• Heterogeneous API consumers and API implementing servers
• Java
• Java related technologies
• Microsoft .NET
• WSO2 is helping us be a “connected enterprise”
MWG WSO2 Product Usage and the MWG API
environment
March 2014
WSO2 API Manager - Composition
March 2014
Three APIM Gateways. Two Primaries,
one is a backup without a BAM
connection. The F5 has an API health
check
nginx: preprocesses static content
Load balances application servers
(APIM 1.5)
API sync: rsync between gateways
(not shown)
MySQL DBs with
Circular replication (not shown)
F5 load balancer exposed to public
internet
APIM Store / Publisher not shown,
Not accessible from public internet
Our WSO2 Product Deployment
March 2014
• Consumer visits a website that is showing ads.
• Doubleclick network delivers the ad to the
consumer’s browser. There are multiple ads that
can be displayed. Each ad contains a set of
keywords relating to the item advertised, and the
retailer id.
• Rich media ad determines the consumer’s zip code.
• MWG API is called with the zip code, keywords,
retailer id.
• The API returned the nearest store and information
on a relevant item for sale. The consumer sees …
An ad is shown: step by step process
March 2014
March 2014
• Geolocation query for a particular retailer.
• bounding box by latitude, longitude
• Haversine function to sharpen results
• Returns a list of stores, ordered by increasing distance.
• Store circulars are queried
• keyword search
• Caching: database retrieval results
• geolocation query caching
• store circular data caching
• memcached used
Database loaded via background E-T-L processes
API functionality
March 2014
• API Manager requires an Authorization header.
• The Ad Unit, running Adobe ActionScript, will supply this header only with a
POST command.
• ActionScript also supports client security by
demanding a crossdomain.xml file.
GET host:port/crossdomain.xml (no context root)
• nginx is used to intercept all the http calls
• serves the static crossdomain.xml file
• passes all other requests to API Manager.
• also used: load balance application server endpoints (needed for APIM 1.5)
Initial Technical Challenges
March 2014
• Received only a total impression count from
marketing. No peak load estimate.
•API Manager / BAM integration vital.
• Essential: Used summarized BAM statistics from the
outset.
•Discovered with BAM: Workload was not random, or average. but very
“bursty”.
• Bottleneck was our serving infrastructure, not API
manager.
• Added a memcached infrastructure on the fly.
•essential to boost for application server response time.
Performance challenges
March 2014
• Uncached API service time is 150 – 200ms.
• Object caching brings to 22ms average service time.
• Cache hit ratio: 85 – 90%.
• Record (with fast average service time): 376
responses per second at 5ms average service time.
• Peak responses per second: 402 responses /second
(our throttle).
Performance highlights
March 2014
• A number of traffic bursts: 100 to 400 responses /
second.
• Traffic slows in the overnight.
• Traffic peaks in late afternoon, evening.
• Hourly, traffic slows 25 minutes after the hour. It
can increase 50% at 55 minutes after the hour.
• Assume: ad network serving hourly adjustments or TV commercials.
• Overall mean: 4.5 responses per second.
• 90th
percentile: 21 responses per second.
• Note: performance summarized by minute, based
on the BAM analytics toolbox for API manager.
Performance Highlights, cont’d.
March 2014
• This plot range:
up to 100/sec
Responses per second distribution
March 2014
• This plot range:
100-400 per sec.
• High end bursts
• Assume:
Ad network
• Few instances.
Responses per second
March 2014
Can spike if:
• Not enough processing
threads
• Cache entries expired.
• Many cache misses and
high traffic.
• No API Manager
limitation seen.
• Note: uncached service is
150ms – 200ms.
• With caching design
point, database is not
limiting.
Average Service Time
March 2014
• WSO2 BAM Cassandra storage
• Cassandra used as a ‘fast write’ repository for the streams of data
from the API manager gateways.
• BAM Hive scripts summarize on a per-minute basis, put summaries in
a relational db for reporting.
• Cassandra data does not seem to expire for us, so the Hive scripts
keep resummarizing.
• Purging old, already summarized Cassandra data.
• WSO2 Api Manager: Publisher
• Provides cool displays of usage right in the publisher from the
summarized statistics.
• Publisher had trouble handling the data once we had a lot of data.
We turned off the display inside Publisher.
Issues Encountered
March 2014
• Key Features
• API Design Wizard
• Support for OAuth2 Scopes
• Statistics Dashboard for developers
• Multi tenant workflow support
• Workflow integration for token generation
• URL templating support for API definition
• Customisable Store themes for tenants
• Forum Support - API Store
• Visibility Control for Documentation
• Statistics dashboard for southbound API calls
• Using Windows Authentication for OAuth2 Token generation
API Manager 1.7.0 is coming up...
March 2014
• The WSO2 API Manager platform is well suited to
handle high volume traffic. It was very capable
and adaptable.
• Essential: WSO2 Business Activity Monitor, using the
WSO2 provided API Manager BAM Analytics toolbox,
allowed us to
•Understand our traffic patterns
•Tune our server infrastructure
•Produce metrics for reporting
Conclusion
March 2014
• Thanks for listening.
• Thanks: Ad unit graphic development: Kurrent
Interactive: http://www.kurrent.com/
• Thanks: WSO2 for a flexible configurable product
set, based on open source standards.
Thanks!

Contenu connexe

Tendances

Extend soa with api management Doag18
Extend soa with api management Doag18Extend soa with api management Doag18
Extend soa with api management Doag18
Vinay Kumar
 
Collecting and Analyzing API Statistics
Collecting and Analyzing API StatisticsCollecting and Analyzing API Statistics
Collecting and Analyzing API Statistics
WSO2
 
Essential API Facade Patterns: Synchronous to Asynchronous Conversion (Episod...
Essential API Facade Patterns: Synchronous to Asynchronous Conversion (Episod...Essential API Facade Patterns: Synchronous to Asynchronous Conversion (Episod...
Essential API Facade Patterns: Synchronous to Asynchronous Conversion (Episod...
Apigee | Google Cloud
 

Tendances (20)

Wso2 api manager analytics and reporting
Wso2 api manager analytics and reportingWso2 api manager analytics and reporting
Wso2 api manager analytics and reporting
 
APN Partner Webinar - AWS Marketplace & Test Drive
APN Partner Webinar - AWS Marketplace & Test DriveAPN Partner Webinar - AWS Marketplace & Test Drive
APN Partner Webinar - AWS Marketplace & Test Drive
 
API Services: Harness the Power of Enterprise Infrastructure
API Services: Harness the Power of Enterprise InfrastructureAPI Services: Harness the Power of Enterprise Infrastructure
API Services: Harness the Power of Enterprise Infrastructure
 
Mule Anypoint API Gateway
Mule Anypoint API GatewayMule Anypoint API Gateway
Mule Anypoint API Gateway
 
How to create a User Defined Policy with IBM APIc (v10)
How to create a User Defined Policy with IBM APIc (v10)How to create a User Defined Policy with IBM APIc (v10)
How to create a User Defined Policy with IBM APIc (v10)
 
Product Keynote: How to Compete in the API Economy
Product Keynote: How to Compete in the API EconomyProduct Keynote: How to Compete in the API Economy
Product Keynote: How to Compete in the API Economy
 
Architecting an Enterprise API Management Strategy
Architecting an Enterprise API Management StrategyArchitecting an Enterprise API Management Strategy
Architecting an Enterprise API Management Strategy
 
Api manager
Api managerApi manager
Api manager
 
Extend soa with api management Doag18
Extend soa with api management Doag18Extend soa with api management Doag18
Extend soa with api management Doag18
 
Collecting and Analyzing API Statistics
Collecting and Analyzing API StatisticsCollecting and Analyzing API Statistics
Collecting and Analyzing API Statistics
 
Achieving Microservices Maturity
Achieving Microservices MaturityAchieving Microservices Maturity
Achieving Microservices Maturity
 
SharePoint Apps model overview
SharePoint Apps model overviewSharePoint Apps model overview
SharePoint Apps model overview
 
Webinar: Embracing REST APIs through APPSeCONNECT
Webinar: Embracing REST APIs through APPSeCONNECTWebinar: Embracing REST APIs through APPSeCONNECT
Webinar: Embracing REST APIs through APPSeCONNECT
 
Mule api management
Mule  api managementMule  api management
Mule api management
 
HAM 1032 Combining the Power of IBM API Management and IBM Integration Bus
HAM 1032 Combining the Power of IBM API Management and IBM Integration BusHAM 1032 Combining the Power of IBM API Management and IBM Integration Bus
HAM 1032 Combining the Power of IBM API Management and IBM Integration Bus
 
API Management Demystified
API Management DemystifiedAPI Management Demystified
API Management Demystified
 
Take Your API Docs from 406 Not Acceptable to 200 OK
Take Your API Docs from 406 Not Acceptable to 200 OKTake Your API Docs from 406 Not Acceptable to 200 OK
Take Your API Docs from 406 Not Acceptable to 200 OK
 
Apinizer - Full API Lifecycle and Integration Platform
Apinizer - Full API Lifecycle and Integration Platform Apinizer - Full API Lifecycle and Integration Platform
Apinizer - Full API Lifecycle and Integration Platform
 
Essential API Facade Patterns: Synchronous to Asynchronous Conversion (Episod...
Essential API Facade Patterns: Synchronous to Asynchronous Conversion (Episod...Essential API Facade Patterns: Synchronous to Asynchronous Conversion (Episod...
Essential API Facade Patterns: Synchronous to Asynchronous Conversion (Episod...
 
API Gateway Deployment Patterns
API Gateway Deployment PatternsAPI Gateway Deployment Patterns
API Gateway Deployment Patterns
 

Similaire à Using WSO2 API Manager to deliver dynamic display advertising

Manage your ap is securely and easily ibm apim 4.0
Manage your ap is securely and easily ibm apim 4.0Manage your ap is securely and easily ibm apim 4.0
Manage your ap is securely and easily ibm apim 4.0
sflynn073
 
Generating Insights from WSO2 API Manager Statistics
Generating Insights from WSO2 API Manager StatisticsGenerating Insights from WSO2 API Manager Statistics
Generating Insights from WSO2 API Manager Statistics
WSO2
 
CodeWebber Presentation_2015
CodeWebber Presentation_2015CodeWebber Presentation_2015
CodeWebber Presentation_2015
Taruna Singh
 
Informatica Cloud Summer 2014 Presentation
Informatica Cloud Summer 2014 PresentationInformatica Cloud Summer 2014 Presentation
Informatica Cloud Summer 2014 Presentation
Informatica Cloud
 
Raftika Publishers media kit
Raftika Publishers media kitRaftika Publishers media kit
Raftika Publishers media kit
raftika
 

Similaire à Using WSO2 API Manager to deliver dynamic display advertising (20)

Smartone v1.0
Smartone v1.0Smartone v1.0
Smartone v1.0
 
API Economy - Cuomo
API Economy - Cuomo API Economy - Cuomo
API Economy - Cuomo
 
Hybris @ Neev
Hybris @ NeevHybris @ Neev
Hybris @ Neev
 
#1922 rest-push2 ap-im-v6
#1922 rest-push2 ap-im-v6#1922 rest-push2 ap-im-v6
#1922 rest-push2 ap-im-v6
 
API Strategy Introduction
API Strategy IntroductionAPI Strategy Introduction
API Strategy Introduction
 
Manage your ap is securely and easily ibm apim 4.0
Manage your ap is securely and easily ibm apim 4.0Manage your ap is securely and easily ibm apim 4.0
Manage your ap is securely and easily ibm apim 4.0
 
[WSO2Con EU 2017] How API Management at Suva is Helping in Reducing Costs to ...
[WSO2Con EU 2017] How API Management at Suva is Helping in Reducing Costs to ...[WSO2Con EU 2017] How API Management at Suva is Helping in Reducing Costs to ...
[WSO2Con EU 2017] How API Management at Suva is Helping in Reducing Costs to ...
 
API Management
API ManagementAPI Management
API Management
 
Generating Insights from WSO2 API Manager Statistics
Generating Insights from WSO2 API Manager StatisticsGenerating Insights from WSO2 API Manager Statistics
Generating Insights from WSO2 API Manager Statistics
 
Effective API Design
Effective API DesignEffective API Design
Effective API Design
 
API Management - A Transformation
API Management - A TransformationAPI Management - A Transformation
API Management - A Transformation
 
How SunTec India elevated the sales of an eCommerce business by automating mu...
How SunTec India elevated the sales of an eCommerce business by automating mu...How SunTec India elevated the sales of an eCommerce business by automating mu...
How SunTec India elevated the sales of an eCommerce business by automating mu...
 
Digital transformation
Digital transformationDigital transformation
Digital transformation
 
eCommerce @ Neev
eCommerce @ NeeveCommerce @ Neev
eCommerce @ Neev
 
Web API Management
Web API ManagementWeb API Management
Web API Management
 
CodeWebber Presentation_2015
CodeWebber Presentation_2015CodeWebber Presentation_2015
CodeWebber Presentation_2015
 
Informatica Cloud Summer 2014 Presentation
Informatica Cloud Summer 2014 PresentationInformatica Cloud Summer 2014 Presentation
Informatica Cloud Summer 2014 Presentation
 
Lean with MEAN (MEAN stack for Lean startup)
Lean with MEAN (MEAN stack for Lean startup)Lean with MEAN (MEAN stack for Lean startup)
Lean with MEAN (MEAN stack for Lean startup)
 
Raftika Publishers media kit
Raftika Publishers media kitRaftika Publishers media kit
Raftika Publishers media kit
 
API Management point of view
API Management point of viewAPI Management point of view
API Management point of view
 

Plus de WSO2

Fueling the Digital Experience Economy with Connected Products
Fueling the Digital Experience Economy with Connected ProductsFueling the Digital Experience Economy with Connected Products
Fueling the Digital Experience Economy with Connected Products
WSO2
 
A Reference Methodology for Agile Digital Businesses
 A Reference Methodology for Agile Digital Businesses A Reference Methodology for Agile Digital Businesses
A Reference Methodology for Agile Digital Businesses
WSO2
 

Plus de WSO2 (20)

Accelerating Enterprise Software Engineering with Platformless
Accelerating Enterprise Software Engineering with PlatformlessAccelerating Enterprise Software Engineering with Platformless
Accelerating Enterprise Software Engineering with Platformless
 
How to Create a Service in Choreo
How to Create a Service in ChoreoHow to Create a Service in Choreo
How to Create a Service in Choreo
 
Ballerina Tech Talk - May 2023
Ballerina Tech Talk - May 2023Ballerina Tech Talk - May 2023
Ballerina Tech Talk - May 2023
 
Platform Strategy to Deliver Digital Experiences on Azure
Platform Strategy to Deliver Digital Experiences on AzurePlatform Strategy to Deliver Digital Experiences on Azure
Platform Strategy to Deliver Digital Experiences on Azure
 
GartnerITSymSessionSlides.pdf
GartnerITSymSessionSlides.pdfGartnerITSymSessionSlides.pdf
GartnerITSymSessionSlides.pdf
 
[Webinar] How to Create an API in Minutes
[Webinar] How to Create an API in Minutes[Webinar] How to Create an API in Minutes
[Webinar] How to Create an API in Minutes
 
Modernizing the Student Journey with Ethos Identity
Modernizing the Student Journey with Ethos IdentityModernizing the Student Journey with Ethos Identity
Modernizing the Student Journey with Ethos Identity
 
Choreo - Build unique digital experiences on WSO2's platform, secured by Etho...
Choreo - Build unique digital experiences on WSO2's platform, secured by Etho...Choreo - Build unique digital experiences on WSO2's platform, secured by Etho...
Choreo - Build unique digital experiences on WSO2's platform, secured by Etho...
 
CIO Summit Berlin 2022.pptx.pdf
CIO Summit Berlin 2022.pptx.pdfCIO Summit Berlin 2022.pptx.pdf
CIO Summit Berlin 2022.pptx.pdf
 
Delivering New Digital Experiences Fast - Introducing Choreo
Delivering New Digital Experiences Fast - Introducing ChoreoDelivering New Digital Experiences Fast - Introducing Choreo
Delivering New Digital Experiences Fast - Introducing Choreo
 
Fueling the Digital Experience Economy with Connected Products
Fueling the Digital Experience Economy with Connected ProductsFueling the Digital Experience Economy with Connected Products
Fueling the Digital Experience Economy with Connected Products
 
A Reference Methodology for Agile Digital Businesses
 A Reference Methodology for Agile Digital Businesses A Reference Methodology for Agile Digital Businesses
A Reference Methodology for Agile Digital Businesses
 
Workflows in WSO2 API Manager - WSO2 API Manager Community Call (12/15/2021)
Workflows in WSO2 API Manager - WSO2 API Manager Community Call (12/15/2021)Workflows in WSO2 API Manager - WSO2 API Manager Community Call (12/15/2021)
Workflows in WSO2 API Manager - WSO2 API Manager Community Call (12/15/2021)
 
Lessons from the pandemic - From a single use case to true transformation
 Lessons from the pandemic - From a single use case to true transformation Lessons from the pandemic - From a single use case to true transformation
Lessons from the pandemic - From a single use case to true transformation
 
Adding Liveliness to Banking Experiences
Adding Liveliness to Banking ExperiencesAdding Liveliness to Banking Experiences
Adding Liveliness to Banking Experiences
 
Building a Future-ready Bank
Building a Future-ready BankBuilding a Future-ready Bank
Building a Future-ready Bank
 
WSO2 API Manager Community Call - November 2021
WSO2 API Manager Community Call - November 2021WSO2 API Manager Community Call - November 2021
WSO2 API Manager Community Call - November 2021
 
[API World ] - Managing Asynchronous APIs
[API World ] - Managing Asynchronous APIs[API World ] - Managing Asynchronous APIs
[API World ] - Managing Asynchronous APIs
 
[API World 2021 ] - Understanding Cloud Native Deployment
[API World 2021 ] - Understanding Cloud Native Deployment[API World 2021 ] - Understanding Cloud Native Deployment
[API World 2021 ] - Understanding Cloud Native Deployment
 
[API Word 2021] - Quantum Duality of “API as a Business and a Technology”
[API Word 2021] - Quantum Duality of “API as a Business and a Technology”[API Word 2021] - Quantum Duality of “API as a Business and a Technology”
[API Word 2021] - Quantum Duality of “API as a Business and a Technology”
 

Dernier

CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Service
giselly40
 
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
Earley Information Science
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
vu2urc
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
Joaquim Jorge
 

Dernier (20)

A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Service
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptx
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CV
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slides
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 

Using WSO2 API Manager to deliver dynamic display advertising

  • 1. March 2014 Case Study: Using WSO2 API Manager to deliver dynamic display advertising Chuck Megivern Senior Software Engineer MyWebGrocer, Inc. cmegivern@mywebgrocer.com May 2014
  • 2. March 2014 Chuck Megivern is a Senior Software Engineer for MyWebGrocer, Inc. He is the company technical lead for open source technologies. Chuck has been developing advertising applications for MyWebGrocer and before that, Dealer.com, for the last five years. He has delivered Display Advertising, SEM, SEO and Digital Video applications and APIs. He has also delivered multiple cloud based server deployments. Earlier in his career, Chuck developed software for IBM and also had a number of engineering assignments there. Chuck has a BSEE degree from Lehigh University, and an MSEE degree from Syracuse University. About the author
  • 3. March 2014 • MyWebGrocer (MWG) was founded in 1999. • We serve the grocery industry and consumer packaged goods industry. • We provide an online grocery platform used by leading retailers encompassing over 10,000 retail locations in the US. • Expanding in Asia Pacific and Europe. • We also have extensive eCommerce and eMarketing solutions. • We provide digital display advertising on our own ad network, as well as on public internet sites that participate in other online ad networks, such as Google DoubleClick. • My area provides APIs for internal company use, and for external business partners. Introducing MyWebGrocer
  • 4. March 2014 • Our case study involves using WSO2 API Manager to enrich display advertising served to consumers via the Google DoubleClick ad network. • The ad network delivers an Adobe Flash based Rich Media ad to consumer’s desktops while they are browsing internet sites. • The ad campaign lasts for a number of weeks. The Rich Media ad, using Action Script, calls a MWG API and dynamically pulls in data every time the ad is displayed. • The API delivers product information that updates daily. That data • comes from the retailer’s store that is closest to the consumer, and • is currently advertising the products of interest. • Most consumer advertising application use cases involve responding to a consumers 'click' expressing interest. • However, this high traffic use case invokes the API every time that a display ad is presented to a consumer. • This presentation discusses our technical approach and application stack used to handle this high volume. Our case study
  • 5. March 2014 WSO2 Product Usage • Case study usage • API Manager 1.5 • Business Activity Monitor (BAM) 2.4.0 • Current Usage • API Manager 1.6 • Business Activity Monitor (BAM) 2.4.1 Types of APIs served • Case study: very high volume consumer browser API invokations. • At the same time, this distributed API manager installation serves: • external business partners using MWG API’s • internal MWG servers invoking MWG API’s • Heterogeneous API consumers and API implementing servers • Java • Java related technologies • Microsoft .NET • WSO2 is helping us be a “connected enterprise” MWG WSO2 Product Usage and the MWG API environment
  • 6. March 2014 WSO2 API Manager - Composition
  • 7. March 2014 Three APIM Gateways. Two Primaries, one is a backup without a BAM connection. The F5 has an API health check nginx: preprocesses static content Load balances application servers (APIM 1.5) API sync: rsync between gateways (not shown) MySQL DBs with Circular replication (not shown) F5 load balancer exposed to public internet APIM Store / Publisher not shown, Not accessible from public internet Our WSO2 Product Deployment
  • 8. March 2014 • Consumer visits a website that is showing ads. • Doubleclick network delivers the ad to the consumer’s browser. There are multiple ads that can be displayed. Each ad contains a set of keywords relating to the item advertised, and the retailer id. • Rich media ad determines the consumer’s zip code. • MWG API is called with the zip code, keywords, retailer id. • The API returned the nearest store and information on a relevant item for sale. The consumer sees … An ad is shown: step by step process
  • 10. March 2014 • Geolocation query for a particular retailer. • bounding box by latitude, longitude • Haversine function to sharpen results • Returns a list of stores, ordered by increasing distance. • Store circulars are queried • keyword search • Caching: database retrieval results • geolocation query caching • store circular data caching • memcached used Database loaded via background E-T-L processes API functionality
  • 11. March 2014 • API Manager requires an Authorization header. • The Ad Unit, running Adobe ActionScript, will supply this header only with a POST command. • ActionScript also supports client security by demanding a crossdomain.xml file. GET host:port/crossdomain.xml (no context root) • nginx is used to intercept all the http calls • serves the static crossdomain.xml file • passes all other requests to API Manager. • also used: load balance application server endpoints (needed for APIM 1.5) Initial Technical Challenges
  • 12. March 2014 • Received only a total impression count from marketing. No peak load estimate. •API Manager / BAM integration vital. • Essential: Used summarized BAM statistics from the outset. •Discovered with BAM: Workload was not random, or average. but very “bursty”. • Bottleneck was our serving infrastructure, not API manager. • Added a memcached infrastructure on the fly. •essential to boost for application server response time. Performance challenges
  • 13. March 2014 • Uncached API service time is 150 – 200ms. • Object caching brings to 22ms average service time. • Cache hit ratio: 85 – 90%. • Record (with fast average service time): 376 responses per second at 5ms average service time. • Peak responses per second: 402 responses /second (our throttle). Performance highlights
  • 14. March 2014 • A number of traffic bursts: 100 to 400 responses / second. • Traffic slows in the overnight. • Traffic peaks in late afternoon, evening. • Hourly, traffic slows 25 minutes after the hour. It can increase 50% at 55 minutes after the hour. • Assume: ad network serving hourly adjustments or TV commercials. • Overall mean: 4.5 responses per second. • 90th percentile: 21 responses per second. • Note: performance summarized by minute, based on the BAM analytics toolbox for API manager. Performance Highlights, cont’d.
  • 15. March 2014 • This plot range: up to 100/sec Responses per second distribution
  • 16. March 2014 • This plot range: 100-400 per sec. • High end bursts • Assume: Ad network • Few instances. Responses per second
  • 17. March 2014 Can spike if: • Not enough processing threads • Cache entries expired. • Many cache misses and high traffic. • No API Manager limitation seen. • Note: uncached service is 150ms – 200ms. • With caching design point, database is not limiting. Average Service Time
  • 18. March 2014 • WSO2 BAM Cassandra storage • Cassandra used as a ‘fast write’ repository for the streams of data from the API manager gateways. • BAM Hive scripts summarize on a per-minute basis, put summaries in a relational db for reporting. • Cassandra data does not seem to expire for us, so the Hive scripts keep resummarizing. • Purging old, already summarized Cassandra data. • WSO2 Api Manager: Publisher • Provides cool displays of usage right in the publisher from the summarized statistics. • Publisher had trouble handling the data once we had a lot of data. We turned off the display inside Publisher. Issues Encountered
  • 19. March 2014 • Key Features • API Design Wizard • Support for OAuth2 Scopes • Statistics Dashboard for developers • Multi tenant workflow support • Workflow integration for token generation • URL templating support for API definition • Customisable Store themes for tenants • Forum Support - API Store • Visibility Control for Documentation • Statistics dashboard for southbound API calls • Using Windows Authentication for OAuth2 Token generation API Manager 1.7.0 is coming up...
  • 20. March 2014 • The WSO2 API Manager platform is well suited to handle high volume traffic. It was very capable and adaptable. • Essential: WSO2 Business Activity Monitor, using the WSO2 provided API Manager BAM Analytics toolbox, allowed us to •Understand our traffic patterns •Tune our server infrastructure •Produce metrics for reporting Conclusion
  • 21. March 2014 • Thanks for listening. • Thanks: Ad unit graphic development: Kurrent Interactive: http://www.kurrent.com/ • Thanks: WSO2 for a flexible configurable product set, based on open source standards. Thanks!