SlideShare a Scribd company logo
1 of 50
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
B u i l d i n g a P h o t o r e a l i s t i c R e a l - t i m e 3 D C o n f i g u r a t o r
w i t h S e r v e r - s i d e R e n d e r i n g s o n A W S
C l a u d i o B r e d f e l d t – C T O - M Y C S
C h r i s t o p h K a s s e n – S o l u t i o n s A r c h i t e c t - A W S
A R C 4 0 5
D e c e m b e r 1 , 2 0 1 7
AWS re:INVENT
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
What can you expect?
• Introduction to 3D configurators
• Rendering on AWS
• Integrate 3D into your web application
• Customer story—mycs
Our expectations
• Knowledge of AWS services
• 3D visualization basics
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
3D configurators
A b r i e f i n t r o d u c t i o n
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Real-time configurators
Cars, fashion, furniture...
Benefits
• Engage with customers
• Visualize final product
• Support buying decision
Server-side rendering
• Quality
• Speed
• Low cost
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Rasterizers
• Composing vectors/polygons
• OpenGL/DirectX
• GPU accelerated
Ray tracing
• Send traces through scene
• Photorealistic images
• GPGPU-optimized
• CUDA or OpenCL
3D rendering
Image
View ray
Shadow ray
Camera
Light source
Scene object
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Rendering on AWS
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
P3
1-8 GPUs
NVIDIA Tesla V100
Volta architecture
1x GPU core
5,120 CUDA cores, 640 tensor cores
16 GB HBM2
Intel Xeon E5-2686 v4 (Broadwell)
ENA adapter
G3
1-4 GPUs
NVIDIA Tesla M60
Maxwell architecture
2x GPU cores
4096 CUDA cores
16 GB GDDR5
Intel Xeon E5-2686 v4 (Broadwell)
ENA adapter
AWS GPU instances
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Elastic GPU—key features
Flexible instance size and attachment
• Right-size instance selection
• Utilize Auto Scaling to handle requests
Windows instances only
OpenGL 4.2 support
• No CUDA, OpenCL, and DirectX support
• Ensure application runs on OpenGL
rendering
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Elastic GPU—operations
Elastic GPU ENI consumes additional IP
Rendering max. 25 fps
Use GPU Caps Viewer to view OpenGL extensions
Troubleshooting
Display framerate
C:Program FilesAmazonEC2ElasticGPUsconfeg.conf
[Application]
show_fps=1
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
How do I choose?
Instance P3
Supports:
OpenGL 4.5, DirectX 12.1
CUDA 9.0+, OpenCL 1.2+
G3
Supports:
OpenGL 4.5, DirectX 12.0
CUDA 8.0+, OpenCL 1.2
Elastic GPU
Supports:
OpenGL 4.2
Use cases Machine learning
Computational finance,
genomics...
3D visualizations
3D rendering
Video encoding....
Applications benefiting
from some GPU
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
3D rendering in web apps
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Integrate rendering into web apps
What do we need?
• Rendering API
• Web app/microservices
• Renderer
• 3D model and model configuration
• Caching
Other requirements
• (Near) real-time rendering
• High-quality rendered images
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Rendering
Rasterizer
• Unity
• Amazon Lumberyard
Ray tracer
• Nvidia Iray, 3ds max…
• Cycles (Blender)
Integrate engine
• Write image to file
• Grab framebuffer
• Utilize native integration
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
import bpy, _cycles
print(_cycles.available_devices())
bpy.context.scene.render.engine = 'CYCLES'
bpy.context.scene.cycles.device = 'GPU'
bpy.context.user_preferences.addons['cycles'].preferences.compute_device_type = 'CUDA'
# Larger tile sizes optimal for GPU processing
bpy.context.scene.render.tile_x = 256
bpy.context.scene.render.tile_y = 256
Ray tracing with Blender
Run Blender from the CLI
blender -b ~/blender/model.blend -o ~/blender/tmp/ 
-P ~/blender/gpu_settings.py -f 1
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Ray tracer on GPU instances
Auto-scaled services and rendering API
Network Load Balancer (NLB)
• Stream images with http/2 push
• TCP level load-balancer
Serve pre-rendered assets via CDN
Caching
• Utilize CloudFront caching
• Rendering API
• Custom caching for http/2
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Rasterizer with Elastic GPU
Auto Scaling
• Only a single fleet of instances
• Instances right-sized
• Elastic GPU attached
Rasterizer engine, e.g. Unity
Caching
• Pre-rendered assets
• Request contains 3D model
configuration
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Operations
Monitor GPU utilization
• GPU instances use nvidia-smi to query data
• Elastic GPU memory usage
Custom CloudWatch metrics from rendering API
Auto Scaling
• Scale GPU fleet based on custom metrics
• Scale up aggressively
• Scale down slowly
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Amazon CloudWatch metrics
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
#!/bin/bash
NAMESPACE='GPU/Metrics' # Metrics namespace
# Fetch GPU metrics
IFS=', ' read -r -a STATS <<< `nvidia-smi --query-gpu=utilization.gpu,utilization.memory --
format=csv,nounits,noheader`
# Gathering aws credential data and put it to cloudwatch
export AWS_DEFAULT_REGION=`curl -s http://169.254.169.254/latest/meta-data/placement/availability-
zone | sed 's/[a-z]$//'`
INSTANCE_ID=`curl -s http://169.254.169.254/latest/meta-data/instance-id`
# Send values to CloudWatch
aws cloudwatch put-metric-data --metric-name Utilization --namespace $NAMESPACE --dimensions
"InstanceId=${INSTANCE_ID}" --unit 'Percent' --value ${STATS[0]}
aws cloudwatch put-metric-data --metric-name MemoryUtilization --namespace $NAMESPACE --dimensions
"InstanceId=${INSTANCE_ID}" --unit 'Percent' --value ${STATS[1]}
Monitor GPU instances
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Optimizations
# Run all commands as root
# Query GPU’s
nvidia-smi -L
# Configure the GPU settings to be persistent.
nvidia-smi -pm 1
# Disable the auto boost feature for all GPUs on the instance.
nvidia-smi --auto-boost-default=0
# Query clock speeds
nvidia-smi -q -d SUPPORTED_CLOCKS
#(P3/G3) Set GPU clock speeds to max. frequency.
nvidia-smi -ac 2505,1177
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Redirect traffic automatically
• Serve pre-generated content
• Minimize impact during spikes
• Safe scaling
Lambda@Edge checks GPU health
• Network calls on Viewer/Origin requests
• 5s/30s timeout
• Rewrite request
Pre-rendered content
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
const https = require('https');
exports.handler = (event, context, callback) => {
const request = event.Records[0].cf.request;
// Fetch metrics from API endpoint
const jsonUrl = 'https://example.com/api/metrics.json';
https.get(jsonUrl, (res) => {
let content = '';
res.on('data', (chunk) => { content += chunk; });
res.on('end', () => {
const apiStatus = JSON.parse(content);
if (Boolean(apiStatus['config']['overloaded'])) // GPU Fleet is under high load
request.uri = apiStatus['config']['redirect']; // Rewrite request
callback(null, request);
});
});
};
Lambda@Edge code example
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Make customization the new normal
Photorealistic real-time 3D online configurators
C u s t o m e r e x a m p l e — M Y C S
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
MYCS
Photorealistic
3D configurators
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
MYCS
Highly customizable furniture
thanks to modularity
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
MYCS
Short lead times
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
MYCS
Affordable premium quality
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
3D configurators
MYCS
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
What can you expect?
Main challenge when building a real-time 3D online configurator
• Client-side vs. server-side renderings
• Ray tracing
• AWS infrastructure
• Lessons learned
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Photorealism Interactivity
(server-side renderings) (client-side WebGL)
vs.
3D configurators
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Client-side WebGL
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Server-side rendering
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Photorealism Interactivity
(server-side renderings) (client-side WebGL)
vs.
3D configurators
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Photorealism Interactivity
(server-side renderings) (client-side WebGL)
vs.
3D configurators
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Server-side rendering
● First image arrives within 2 seconds after
user interaction
● Progressive streaming of images
● High degree of interactivity
● Cross-device compatibility
● Scalable and affordable
Goals
● Not optimized for real-time applications
● Low interactivity
● Steeper learning curve and setup compared
to WebGL
● Expensive (GPU servers, licenses, etc.)
Downsides
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Ray tracing
MYCS
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Ray tracing
Realistic simulation of lighting used to
create photorealistic looking images
The ray tracer is responsible for
performing the necessary computations to
cast shadows and light up objects. This
means you can create images full of
mirrors, transparent surfaces, and object
shadows.
Source: https://commons.wikimedia.org/wiki/File:Ray_trace_diagram.svg
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Ray tracing
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
AWS + GPU ray tracing
MYCS
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Main challenge
Rendering speed and (affordable) scalability
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Infrastructure v1.0
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Infrastructure v1.0
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Rendering streaming protocol
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Infrastructure v1.0
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Infrastructure v2.0
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Infrastructure v3.0
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Infrastructure v4.0
( c u r r e n t v e r s i o n )
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Infrastructure v5.0
( i n p r o g r e s s )
HTTP/2 Push
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Lessons learned
• Aim for the best possible hardware
• Don’t be afraid to step deep into rendering topics
• Always re-evaluate your infrastructure
• Keep most of your energy on the renderer
• Don’t just stick to one technology
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Thank you!
C l a u d i o B r e d f e l d t – C T O - M Y C S
C h r i s t o p h K a s s e n – S o l u t i o n s A r c h i t e c t - A W S

More Related Content

What's hot

RedisConf17 - Roblox - How Roblox Keeps Millions of Users Up to Date with Red...
RedisConf17 - Roblox - How Roblox Keeps Millions of Users Up to Date with Red...RedisConf17 - Roblox - How Roblox Keeps Millions of Users Up to Date with Red...
RedisConf17 - Roblox - How Roblox Keeps Millions of Users Up to Date with Red...Redis Labs
 
MongoDB World 2015 - A Technical Introduction to WiredTiger
MongoDB World 2015 - A Technical Introduction to WiredTigerMongoDB World 2015 - A Technical Introduction to WiredTiger
MongoDB World 2015 - A Technical Introduction to WiredTigerWiredTiger
 
SRV413 Deep Dive on Elastic Block Storage (Amazon EBS)
SRV413 Deep Dive on Elastic Block Storage (Amazon EBS)SRV413 Deep Dive on Elastic Block Storage (Amazon EBS)
SRV413 Deep Dive on Elastic Block Storage (Amazon EBS)Amazon Web Services
 
Introduction to MongoDB
Introduction to MongoDBIntroduction to MongoDB
Introduction to MongoDBMongoDB
 
포트폴리오 오경원
포트폴리오 오경원포트폴리오 오경원
포트폴리오 오경원Sio Oh
 
소셜게임 서버 개발 관점에서 본 Node.js의 장단점과 대안
소셜게임 서버 개발 관점에서 본 Node.js의 장단점과 대안소셜게임 서버 개발 관점에서 본 Node.js의 장단점과 대안
소셜게임 서버 개발 관점에서 본 Node.js의 장단점과 대안Jeongsang Baek
 
Oracle OCI APIs and SDK
Oracle OCI APIs and SDKOracle OCI APIs and SDK
Oracle OCI APIs and SDKPhil Wilkins
 
[D2]java 성능에 대한 오해와 편견
[D2]java 성능에 대한 오해와 편견[D2]java 성능에 대한 오해와 편견
[D2]java 성능에 대한 오해와 편견NAVER D2
 
김종욱 포트폴리오
김종욱 포트폴리오김종욱 포트폴리오
김종욱 포트폴리오Jonguk Kim
 
메타버스와 생성형 AI 조사(김병철) 20230323.pptx
메타버스와 생성형 AI 조사(김병철) 20230323.pptx메타버스와 생성형 AI 조사(김병철) 20230323.pptx
메타버스와 생성형 AI 조사(김병철) 20230323.pptxssuserc0b359
 
A Deeper Understanding of Spark Internals (Hadoop Conference Japan 2014)
A Deeper Understanding of Spark Internals (Hadoop Conference Japan 2014)A Deeper Understanding of Spark Internals (Hadoop Conference Japan 2014)
A Deeper Understanding of Spark Internals (Hadoop Conference Japan 2014)Hadoop / Spark Conference Japan
 
서버 성능에 대한 정의와 이해
서버 성능에 대한 정의와 이해서버 성능에 대한 정의와 이해
서버 성능에 대한 정의와 이해중선 곽
 
차정민 (소프트웨어 엔지니어) 이력서 + 경력기술서
차정민 (소프트웨어 엔지니어) 이력서 + 경력기술서차정민 (소프트웨어 엔지니어) 이력서 + 경력기술서
차정민 (소프트웨어 엔지니어) 이력서 + 경력기술서Jeongmin Cha
 
쿠키런 1년, 서버개발 분투기
쿠키런 1년, 서버개발 분투기쿠키런 1년, 서버개발 분투기
쿠키런 1년, 서버개발 분투기Brian Hong
 
MMOG Server-Side 충돌 및 이동처리 설계와 구현
MMOG Server-Side 충돌 및 이동처리 설계와 구현MMOG Server-Side 충돌 및 이동처리 설계와 구현
MMOG Server-Side 충돌 및 이동처리 설계와 구현YEONG-CHEON YOU
 
A Technical Introduction to WiredTiger
A Technical Introduction to WiredTigerA Technical Introduction to WiredTiger
A Technical Introduction to WiredTigerMongoDB
 
유니티의 툰셰이딩을 사용한 3D 애니메이션 표현
유니티의 툰셰이딩을 사용한 3D 애니메이션 표현유니티의 툰셰이딩을 사용한 3D 애니메이션 표현
유니티의 툰셰이딩을 사용한 3D 애니메이션 표현MinGeun Park
 
DRAC: Designing RISC-V-based Accelerators for next generation Computers
DRAC: Designing RISC-V-based Accelerators for next generation ComputersDRAC: Designing RISC-V-based Accelerators for next generation Computers
DRAC: Designing RISC-V-based Accelerators for next generation ComputersFacultad de Informática UCM
 
[KGC 2012] Online Game Server Architecture Case Study Performance and Security
[KGC 2012] Online Game Server Architecture Case Study Performance and Security[KGC 2012] Online Game Server Architecture Case Study Performance and Security
[KGC 2012] Online Game Server Architecture Case Study Performance and SecuritySeungmin Shin
 

What's hot (20)

RedisConf17 - Roblox - How Roblox Keeps Millions of Users Up to Date with Red...
RedisConf17 - Roblox - How Roblox Keeps Millions of Users Up to Date with Red...RedisConf17 - Roblox - How Roblox Keeps Millions of Users Up to Date with Red...
RedisConf17 - Roblox - How Roblox Keeps Millions of Users Up to Date with Red...
 
MongoDB World 2015 - A Technical Introduction to WiredTiger
MongoDB World 2015 - A Technical Introduction to WiredTigerMongoDB World 2015 - A Technical Introduction to WiredTiger
MongoDB World 2015 - A Technical Introduction to WiredTiger
 
SRV413 Deep Dive on Elastic Block Storage (Amazon EBS)
SRV413 Deep Dive on Elastic Block Storage (Amazon EBS)SRV413 Deep Dive on Elastic Block Storage (Amazon EBS)
SRV413 Deep Dive on Elastic Block Storage (Amazon EBS)
 
Introduction to MongoDB
Introduction to MongoDBIntroduction to MongoDB
Introduction to MongoDB
 
포트폴리오 오경원
포트폴리오 오경원포트폴리오 오경원
포트폴리오 오경원
 
소셜게임 서버 개발 관점에서 본 Node.js의 장단점과 대안
소셜게임 서버 개발 관점에서 본 Node.js의 장단점과 대안소셜게임 서버 개발 관점에서 본 Node.js의 장단점과 대안
소셜게임 서버 개발 관점에서 본 Node.js의 장단점과 대안
 
Oracle OCI APIs and SDK
Oracle OCI APIs and SDKOracle OCI APIs and SDK
Oracle OCI APIs and SDK
 
[D2]java 성능에 대한 오해와 편견
[D2]java 성능에 대한 오해와 편견[D2]java 성능에 대한 오해와 편견
[D2]java 성능에 대한 오해와 편견
 
김종욱 포트폴리오
김종욱 포트폴리오김종욱 포트폴리오
김종욱 포트폴리오
 
메타버스와 생성형 AI 조사(김병철) 20230323.pptx
메타버스와 생성형 AI 조사(김병철) 20230323.pptx메타버스와 생성형 AI 조사(김병철) 20230323.pptx
메타버스와 생성형 AI 조사(김병철) 20230323.pptx
 
A Deeper Understanding of Spark Internals (Hadoop Conference Japan 2014)
A Deeper Understanding of Spark Internals (Hadoop Conference Japan 2014)A Deeper Understanding of Spark Internals (Hadoop Conference Japan 2014)
A Deeper Understanding of Spark Internals (Hadoop Conference Japan 2014)
 
Vertx
VertxVertx
Vertx
 
서버 성능에 대한 정의와 이해
서버 성능에 대한 정의와 이해서버 성능에 대한 정의와 이해
서버 성능에 대한 정의와 이해
 
차정민 (소프트웨어 엔지니어) 이력서 + 경력기술서
차정민 (소프트웨어 엔지니어) 이력서 + 경력기술서차정민 (소프트웨어 엔지니어) 이력서 + 경력기술서
차정민 (소프트웨어 엔지니어) 이력서 + 경력기술서
 
쿠키런 1년, 서버개발 분투기
쿠키런 1년, 서버개발 분투기쿠키런 1년, 서버개발 분투기
쿠키런 1년, 서버개발 분투기
 
MMOG Server-Side 충돌 및 이동처리 설계와 구현
MMOG Server-Side 충돌 및 이동처리 설계와 구현MMOG Server-Side 충돌 및 이동처리 설계와 구현
MMOG Server-Side 충돌 및 이동처리 설계와 구현
 
A Technical Introduction to WiredTiger
A Technical Introduction to WiredTigerA Technical Introduction to WiredTiger
A Technical Introduction to WiredTiger
 
유니티의 툰셰이딩을 사용한 3D 애니메이션 표현
유니티의 툰셰이딩을 사용한 3D 애니메이션 표현유니티의 툰셰이딩을 사용한 3D 애니메이션 표현
유니티의 툰셰이딩을 사용한 3D 애니메이션 표현
 
DRAC: Designing RISC-V-based Accelerators for next generation Computers
DRAC: Designing RISC-V-based Accelerators for next generation ComputersDRAC: Designing RISC-V-based Accelerators for next generation Computers
DRAC: Designing RISC-V-based Accelerators for next generation Computers
 
[KGC 2012] Online Game Server Architecture Case Study Performance and Security
[KGC 2012] Online Game Server Architecture Case Study Performance and Security[KGC 2012] Online Game Server Architecture Case Study Performance and Security
[KGC 2012] Online Game Server Architecture Case Study Performance and Security
 

Similar to Building Photorealistic 3D Configurators on AWS

DAT317_Migrating Databases and Data Warehouses to the Cloud
DAT317_Migrating Databases and Data Warehouses to the CloudDAT317_Migrating Databases and Data Warehouses to the Cloud
DAT317_Migrating Databases and Data Warehouses to the CloudAmazon Web Services
 
AWS Compute Evolved Week: High Performance Computing on AWS
AWS Compute Evolved Week: High Performance Computing on AWSAWS Compute Evolved Week: High Performance Computing on AWS
AWS Compute Evolved Week: High Performance Computing on AWSAmazon Web Services
 
High Performance Computing on AWS
High Performance Computing on AWSHigh Performance Computing on AWS
High Performance Computing on AWSAmazon Web Services
 
Create a Serverless Image Processing Platform
Create a Serverless Image Processing PlatformCreate a Serverless Image Processing Platform
Create a Serverless Image Processing PlatformAmazon Web Services
 
The Gronk Effect: Efficiently Handling Huge Spikes in Traffic Using Predictiv...
The Gronk Effect: Efficiently Handling Huge Spikes in Traffic Using Predictiv...The Gronk Effect: Efficiently Handling Huge Spikes in Traffic Using Predictiv...
The Gronk Effect: Efficiently Handling Huge Spikes in Traffic Using Predictiv...Amazon Web Services
 
Building .NET-based Serverless Architectures and Running .NET Core Microservi...
Building .NET-based Serverless Architectures and Running .NET Core Microservi...Building .NET-based Serverless Architectures and Running .NET Core Microservi...
Building .NET-based Serverless Architectures and Running .NET Core Microservi...Amazon Web Services
 
Born in the Cloud, Built like a Startup
Born in the Cloud, Built like a StartupBorn in the Cloud, Built like a Startup
Born in the Cloud, Built like a StartupAmazon Web Services
 
NEW LAUNCH! AWS PrivateLink: Bringing SaaS Solutions into Your VPCs and Your ...
NEW LAUNCH! AWS PrivateLink: Bringing SaaS Solutions into Your VPCs and Your ...NEW LAUNCH! AWS PrivateLink: Bringing SaaS Solutions into Your VPCs and Your ...
NEW LAUNCH! AWS PrivateLink: Bringing SaaS Solutions into Your VPCs and Your ...Amazon Web Services
 
Verizon: Modernizing Enterprise Infrastructure with AWS - WIN307 - re:Invent ...
Verizon: Modernizing Enterprise Infrastructure with AWS - WIN307 - re:Invent ...Verizon: Modernizing Enterprise Infrastructure with AWS - WIN307 - re:Invent ...
Verizon: Modernizing Enterprise Infrastructure with AWS - WIN307 - re:Invent ...Amazon Web Services
 
WIN203_With Amazon EC2 for Windows Server and Thinkbox Deadline
WIN203_With Amazon EC2 for Windows Server and Thinkbox DeadlineWIN203_With Amazon EC2 for Windows Server and Thinkbox Deadline
WIN203_With Amazon EC2 for Windows Server and Thinkbox DeadlineAmazon Web Services
 
AWS X-Ray: Debugging Applications at Scale - AWS Online Tech Talks
AWS X-Ray: Debugging Applications at Scale - AWS Online Tech TalksAWS X-Ray: Debugging Applications at Scale - AWS Online Tech Talks
AWS X-Ray: Debugging Applications at Scale - AWS Online Tech TalksAmazon Web Services
 
透過最新的 AWS 服務在 2019 年為您的業務轉型 (Level 200)
透過最新的 AWS 服務在 2019 年為您的業務轉型 (Level 200)透過最新的 AWS 服務在 2019 年為您的業務轉型 (Level 200)
透過最新的 AWS 服務在 2019 年為您的業務轉型 (Level 200)Amazon Web Services
 
DynamoDB adaptive capacity: smooth performance for chaotic workloads - DAT327...
DynamoDB adaptive capacity: smooth performance for chaotic workloads - DAT327...DynamoDB adaptive capacity: smooth performance for chaotic workloads - DAT327...
DynamoDB adaptive capacity: smooth performance for chaotic workloads - DAT327...Amazon Web Services
 
Heterogenous Migration with DMS & SCT - Michael Russo
Heterogenous Migration with DMS & SCT - Michael RussoHeterogenous Migration with DMS & SCT - Michael Russo
Heterogenous Migration with DMS & SCT - Michael RussoAmazon Web Services
 
Create a Serverless Image Processing Platform - ARC326 - re:Invent 2017
Create a Serverless Image Processing Platform - ARC326 - re:Invent 2017Create a Serverless Image Processing Platform - ARC326 - re:Invent 2017
Create a Serverless Image Processing Platform - ARC326 - re:Invent 2017Amazon Web Services
 
NEW LAUNCH! Delivering Powerful Graphics-Intensive Applications from the AWS ...
NEW LAUNCH! Delivering Powerful Graphics-Intensive Applications from the AWS ...NEW LAUNCH! Delivering Powerful Graphics-Intensive Applications from the AWS ...
NEW LAUNCH! Delivering Powerful Graphics-Intensive Applications from the AWS ...Amazon Web Services
 
Getting Started with AWS for Developers
Getting Started with AWS for DevelopersGetting Started with AWS for Developers
Getting Started with AWS for DevelopersAmazon Web Services
 

Similar to Building Photorealistic 3D Configurators on AWS (20)

DAT317_Migrating Databases and Data Warehouses to the Cloud
DAT317_Migrating Databases and Data Warehouses to the CloudDAT317_Migrating Databases and Data Warehouses to the Cloud
DAT317_Migrating Databases and Data Warehouses to the Cloud
 
AWS Compute Evolved Week: High Performance Computing on AWS
AWS Compute Evolved Week: High Performance Computing on AWSAWS Compute Evolved Week: High Performance Computing on AWS
AWS Compute Evolved Week: High Performance Computing on AWS
 
High Performance Computing on AWS
High Performance Computing on AWSHigh Performance Computing on AWS
High Performance Computing on AWS
 
Create a Serverless Image Processing Platform
Create a Serverless Image Processing PlatformCreate a Serverless Image Processing Platform
Create a Serverless Image Processing Platform
 
The Gronk Effect: Efficiently Handling Huge Spikes in Traffic Using Predictiv...
The Gronk Effect: Efficiently Handling Huge Spikes in Traffic Using Predictiv...The Gronk Effect: Efficiently Handling Huge Spikes in Traffic Using Predictiv...
The Gronk Effect: Efficiently Handling Huge Spikes in Traffic Using Predictiv...
 
Building .NET-based Serverless Architectures and Running .NET Core Microservi...
Building .NET-based Serverless Architectures and Running .NET Core Microservi...Building .NET-based Serverless Architectures and Running .NET Core Microservi...
Building .NET-based Serverless Architectures and Running .NET Core Microservi...
 
Born in the Cloud, Built like a Startup
Born in the Cloud, Built like a StartupBorn in the Cloud, Built like a Startup
Born in the Cloud, Built like a Startup
 
MAE301_Boom for your Buck
MAE301_Boom for your BuckMAE301_Boom for your Buck
MAE301_Boom for your Buck
 
NEW LAUNCH! AWS PrivateLink: Bringing SaaS Solutions into Your VPCs and Your ...
NEW LAUNCH! AWS PrivateLink: Bringing SaaS Solutions into Your VPCs and Your ...NEW LAUNCH! AWS PrivateLink: Bringing SaaS Solutions into Your VPCs and Your ...
NEW LAUNCH! AWS PrivateLink: Bringing SaaS Solutions into Your VPCs and Your ...
 
Verizon: Modernizing Enterprise Infrastructure with AWS - WIN307 - re:Invent ...
Verizon: Modernizing Enterprise Infrastructure with AWS - WIN307 - re:Invent ...Verizon: Modernizing Enterprise Infrastructure with AWS - WIN307 - re:Invent ...
Verizon: Modernizing Enterprise Infrastructure with AWS - WIN307 - re:Invent ...
 
WIN203_With Amazon EC2 for Windows Server and Thinkbox Deadline
WIN203_With Amazon EC2 for Windows Server and Thinkbox DeadlineWIN203_With Amazon EC2 for Windows Server and Thinkbox Deadline
WIN203_With Amazon EC2 for Windows Server and Thinkbox Deadline
 
ARC205_Born in the Cloud
ARC205_Born in the CloudARC205_Born in the Cloud
ARC205_Born in the Cloud
 
AWS X-Ray: Debugging Applications at Scale - AWS Online Tech Talks
AWS X-Ray: Debugging Applications at Scale - AWS Online Tech TalksAWS X-Ray: Debugging Applications at Scale - AWS Online Tech Talks
AWS X-Ray: Debugging Applications at Scale - AWS Online Tech Talks
 
透過最新的 AWS 服務在 2019 年為您的業務轉型 (Level 200)
透過最新的 AWS 服務在 2019 年為您的業務轉型 (Level 200)透過最新的 AWS 服務在 2019 年為您的業務轉型 (Level 200)
透過最新的 AWS 服務在 2019 年為您的業務轉型 (Level 200)
 
DynamoDB adaptive capacity: smooth performance for chaotic workloads - DAT327...
DynamoDB adaptive capacity: smooth performance for chaotic workloads - DAT327...DynamoDB adaptive capacity: smooth performance for chaotic workloads - DAT327...
DynamoDB adaptive capacity: smooth performance for chaotic workloads - DAT327...
 
Containers on AWS
Containers on AWSContainers on AWS
Containers on AWS
 
Heterogenous Migration with DMS & SCT - Michael Russo
Heterogenous Migration with DMS & SCT - Michael RussoHeterogenous Migration with DMS & SCT - Michael Russo
Heterogenous Migration with DMS & SCT - Michael Russo
 
Create a Serverless Image Processing Platform - ARC326 - re:Invent 2017
Create a Serverless Image Processing Platform - ARC326 - re:Invent 2017Create a Serverless Image Processing Platform - ARC326 - re:Invent 2017
Create a Serverless Image Processing Platform - ARC326 - re:Invent 2017
 
NEW LAUNCH! Delivering Powerful Graphics-Intensive Applications from the AWS ...
NEW LAUNCH! Delivering Powerful Graphics-Intensive Applications from the AWS ...NEW LAUNCH! Delivering Powerful Graphics-Intensive Applications from the AWS ...
NEW LAUNCH! Delivering Powerful Graphics-Intensive Applications from the AWS ...
 
Getting Started with AWS for Developers
Getting Started with AWS for DevelopersGetting Started with AWS for Developers
Getting Started with AWS for Developers
 

More from Amazon Web Services

Come costruire servizi di Forecasting sfruttando algoritmi di ML e deep learn...
Come costruire servizi di Forecasting sfruttando algoritmi di ML e deep learn...Come costruire servizi di Forecasting sfruttando algoritmi di ML e deep learn...
Come costruire servizi di Forecasting sfruttando algoritmi di ML e deep learn...Amazon Web Services
 
Big Data per le Startup: come creare applicazioni Big Data in modalità Server...
Big Data per le Startup: come creare applicazioni Big Data in modalità Server...Big Data per le Startup: come creare applicazioni Big Data in modalità Server...
Big Data per le Startup: come creare applicazioni Big Data in modalità Server...Amazon Web Services
 
Esegui pod serverless con Amazon EKS e AWS Fargate
Esegui pod serverless con Amazon EKS e AWS FargateEsegui pod serverless con Amazon EKS e AWS Fargate
Esegui pod serverless con Amazon EKS e AWS FargateAmazon Web Services
 
Costruire Applicazioni Moderne con AWS
Costruire Applicazioni Moderne con AWSCostruire Applicazioni Moderne con AWS
Costruire Applicazioni Moderne con AWSAmazon Web Services
 
Come spendere fino al 90% in meno con i container e le istanze spot
Come spendere fino al 90% in meno con i container e le istanze spot Come spendere fino al 90% in meno con i container e le istanze spot
Come spendere fino al 90% in meno con i container e le istanze spot Amazon Web Services
 
Rendi unica l’offerta della tua startup sul mercato con i servizi Machine Lea...
Rendi unica l’offerta della tua startup sul mercato con i servizi Machine Lea...Rendi unica l’offerta della tua startup sul mercato con i servizi Machine Lea...
Rendi unica l’offerta della tua startup sul mercato con i servizi Machine Lea...Amazon Web Services
 
OpsWorks Configuration Management: automatizza la gestione e i deployment del...
OpsWorks Configuration Management: automatizza la gestione e i deployment del...OpsWorks Configuration Management: automatizza la gestione e i deployment del...
OpsWorks Configuration Management: automatizza la gestione e i deployment del...Amazon Web Services
 
Microsoft Active Directory su AWS per supportare i tuoi Windows Workloads
Microsoft Active Directory su AWS per supportare i tuoi Windows WorkloadsMicrosoft Active Directory su AWS per supportare i tuoi Windows Workloads
Microsoft Active Directory su AWS per supportare i tuoi Windows WorkloadsAmazon Web Services
 
Database Oracle e VMware Cloud on AWS i miti da sfatare
Database Oracle e VMware Cloud on AWS i miti da sfatareDatabase Oracle e VMware Cloud on AWS i miti da sfatare
Database Oracle e VMware Cloud on AWS i miti da sfatareAmazon Web Services
 
Crea la tua prima serverless ledger-based app con QLDB e NodeJS
Crea la tua prima serverless ledger-based app con QLDB e NodeJSCrea la tua prima serverless ledger-based app con QLDB e NodeJS
Crea la tua prima serverless ledger-based app con QLDB e NodeJSAmazon Web Services
 
API moderne real-time per applicazioni mobili e web
API moderne real-time per applicazioni mobili e webAPI moderne real-time per applicazioni mobili e web
API moderne real-time per applicazioni mobili e webAmazon Web Services
 
Database Oracle e VMware Cloud™ on AWS: i miti da sfatare
Database Oracle e VMware Cloud™ on AWS: i miti da sfatareDatabase Oracle e VMware Cloud™ on AWS: i miti da sfatare
Database Oracle e VMware Cloud™ on AWS: i miti da sfatareAmazon Web Services
 
Tools for building your MVP on AWS
Tools for building your MVP on AWSTools for building your MVP on AWS
Tools for building your MVP on AWSAmazon Web Services
 
How to Build a Winning Pitch Deck
How to Build a Winning Pitch DeckHow to Build a Winning Pitch Deck
How to Build a Winning Pitch DeckAmazon Web Services
 
Building a web application without servers
Building a web application without serversBuilding a web application without servers
Building a web application without serversAmazon Web Services
 
AWS_HK_StartupDay_Building Interactive websites while automating for efficien...
AWS_HK_StartupDay_Building Interactive websites while automating for efficien...AWS_HK_StartupDay_Building Interactive websites while automating for efficien...
AWS_HK_StartupDay_Building Interactive websites while automating for efficien...Amazon Web Services
 
Introduzione a Amazon Elastic Container Service
Introduzione a Amazon Elastic Container ServiceIntroduzione a Amazon Elastic Container Service
Introduzione a Amazon Elastic Container ServiceAmazon Web Services
 

More from Amazon Web Services (20)

Come costruire servizi di Forecasting sfruttando algoritmi di ML e deep learn...
Come costruire servizi di Forecasting sfruttando algoritmi di ML e deep learn...Come costruire servizi di Forecasting sfruttando algoritmi di ML e deep learn...
Come costruire servizi di Forecasting sfruttando algoritmi di ML e deep learn...
 
Big Data per le Startup: come creare applicazioni Big Data in modalità Server...
Big Data per le Startup: come creare applicazioni Big Data in modalità Server...Big Data per le Startup: come creare applicazioni Big Data in modalità Server...
Big Data per le Startup: come creare applicazioni Big Data in modalità Server...
 
Esegui pod serverless con Amazon EKS e AWS Fargate
Esegui pod serverless con Amazon EKS e AWS FargateEsegui pod serverless con Amazon EKS e AWS Fargate
Esegui pod serverless con Amazon EKS e AWS Fargate
 
Costruire Applicazioni Moderne con AWS
Costruire Applicazioni Moderne con AWSCostruire Applicazioni Moderne con AWS
Costruire Applicazioni Moderne con AWS
 
Come spendere fino al 90% in meno con i container e le istanze spot
Come spendere fino al 90% in meno con i container e le istanze spot Come spendere fino al 90% in meno con i container e le istanze spot
Come spendere fino al 90% in meno con i container e le istanze spot
 
Open banking as a service
Open banking as a serviceOpen banking as a service
Open banking as a service
 
Rendi unica l’offerta della tua startup sul mercato con i servizi Machine Lea...
Rendi unica l’offerta della tua startup sul mercato con i servizi Machine Lea...Rendi unica l’offerta della tua startup sul mercato con i servizi Machine Lea...
Rendi unica l’offerta della tua startup sul mercato con i servizi Machine Lea...
 
OpsWorks Configuration Management: automatizza la gestione e i deployment del...
OpsWorks Configuration Management: automatizza la gestione e i deployment del...OpsWorks Configuration Management: automatizza la gestione e i deployment del...
OpsWorks Configuration Management: automatizza la gestione e i deployment del...
 
Microsoft Active Directory su AWS per supportare i tuoi Windows Workloads
Microsoft Active Directory su AWS per supportare i tuoi Windows WorkloadsMicrosoft Active Directory su AWS per supportare i tuoi Windows Workloads
Microsoft Active Directory su AWS per supportare i tuoi Windows Workloads
 
Computer Vision con AWS
Computer Vision con AWSComputer Vision con AWS
Computer Vision con AWS
 
Database Oracle e VMware Cloud on AWS i miti da sfatare
Database Oracle e VMware Cloud on AWS i miti da sfatareDatabase Oracle e VMware Cloud on AWS i miti da sfatare
Database Oracle e VMware Cloud on AWS i miti da sfatare
 
Crea la tua prima serverless ledger-based app con QLDB e NodeJS
Crea la tua prima serverless ledger-based app con QLDB e NodeJSCrea la tua prima serverless ledger-based app con QLDB e NodeJS
Crea la tua prima serverless ledger-based app con QLDB e NodeJS
 
API moderne real-time per applicazioni mobili e web
API moderne real-time per applicazioni mobili e webAPI moderne real-time per applicazioni mobili e web
API moderne real-time per applicazioni mobili e web
 
Database Oracle e VMware Cloud™ on AWS: i miti da sfatare
Database Oracle e VMware Cloud™ on AWS: i miti da sfatareDatabase Oracle e VMware Cloud™ on AWS: i miti da sfatare
Database Oracle e VMware Cloud™ on AWS: i miti da sfatare
 
Tools for building your MVP on AWS
Tools for building your MVP on AWSTools for building your MVP on AWS
Tools for building your MVP on AWS
 
How to Build a Winning Pitch Deck
How to Build a Winning Pitch DeckHow to Build a Winning Pitch Deck
How to Build a Winning Pitch Deck
 
Building a web application without servers
Building a web application without serversBuilding a web application without servers
Building a web application without servers
 
Fundraising Essentials
Fundraising EssentialsFundraising Essentials
Fundraising Essentials
 
AWS_HK_StartupDay_Building Interactive websites while automating for efficien...
AWS_HK_StartupDay_Building Interactive websites while automating for efficien...AWS_HK_StartupDay_Building Interactive websites while automating for efficien...
AWS_HK_StartupDay_Building Interactive websites while automating for efficien...
 
Introduzione a Amazon Elastic Container Service
Introduzione a Amazon Elastic Container ServiceIntroduzione a Amazon Elastic Container Service
Introduzione a Amazon Elastic Container Service
 

Building Photorealistic 3D Configurators on AWS

  • 1. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. B u i l d i n g a P h o t o r e a l i s t i c R e a l - t i m e 3 D C o n f i g u r a t o r w i t h S e r v e r - s i d e R e n d e r i n g s o n A W S C l a u d i o B r e d f e l d t – C T O - M Y C S C h r i s t o p h K a s s e n – S o l u t i o n s A r c h i t e c t - A W S A R C 4 0 5 D e c e m b e r 1 , 2 0 1 7 AWS re:INVENT
  • 2. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. What can you expect? • Introduction to 3D configurators • Rendering on AWS • Integrate 3D into your web application • Customer story—mycs Our expectations • Knowledge of AWS services • 3D visualization basics
  • 3. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. 3D configurators A b r i e f i n t r o d u c t i o n
  • 4. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Real-time configurators Cars, fashion, furniture... Benefits • Engage with customers • Visualize final product • Support buying decision Server-side rendering • Quality • Speed • Low cost
  • 5. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Rasterizers • Composing vectors/polygons • OpenGL/DirectX • GPU accelerated Ray tracing • Send traces through scene • Photorealistic images • GPGPU-optimized • CUDA or OpenCL 3D rendering Image View ray Shadow ray Camera Light source Scene object
  • 6. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Rendering on AWS
  • 7. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. P3 1-8 GPUs NVIDIA Tesla V100 Volta architecture 1x GPU core 5,120 CUDA cores, 640 tensor cores 16 GB HBM2 Intel Xeon E5-2686 v4 (Broadwell) ENA adapter G3 1-4 GPUs NVIDIA Tesla M60 Maxwell architecture 2x GPU cores 4096 CUDA cores 16 GB GDDR5 Intel Xeon E5-2686 v4 (Broadwell) ENA adapter AWS GPU instances
  • 8. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Elastic GPU—key features Flexible instance size and attachment • Right-size instance selection • Utilize Auto Scaling to handle requests Windows instances only OpenGL 4.2 support • No CUDA, OpenCL, and DirectX support • Ensure application runs on OpenGL rendering
  • 9. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Elastic GPU—operations Elastic GPU ENI consumes additional IP Rendering max. 25 fps Use GPU Caps Viewer to view OpenGL extensions Troubleshooting Display framerate C:Program FilesAmazonEC2ElasticGPUsconfeg.conf [Application] show_fps=1
  • 10. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. How do I choose? Instance P3 Supports: OpenGL 4.5, DirectX 12.1 CUDA 9.0+, OpenCL 1.2+ G3 Supports: OpenGL 4.5, DirectX 12.0 CUDA 8.0+, OpenCL 1.2 Elastic GPU Supports: OpenGL 4.2 Use cases Machine learning Computational finance, genomics... 3D visualizations 3D rendering Video encoding.... Applications benefiting from some GPU
  • 11. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. 3D rendering in web apps
  • 12. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Integrate rendering into web apps What do we need? • Rendering API • Web app/microservices • Renderer • 3D model and model configuration • Caching Other requirements • (Near) real-time rendering • High-quality rendered images
  • 13. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Rendering Rasterizer • Unity • Amazon Lumberyard Ray tracer • Nvidia Iray, 3ds max… • Cycles (Blender) Integrate engine • Write image to file • Grab framebuffer • Utilize native integration
  • 14. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. import bpy, _cycles print(_cycles.available_devices()) bpy.context.scene.render.engine = 'CYCLES' bpy.context.scene.cycles.device = 'GPU' bpy.context.user_preferences.addons['cycles'].preferences.compute_device_type = 'CUDA' # Larger tile sizes optimal for GPU processing bpy.context.scene.render.tile_x = 256 bpy.context.scene.render.tile_y = 256 Ray tracing with Blender Run Blender from the CLI blender -b ~/blender/model.blend -o ~/blender/tmp/ -P ~/blender/gpu_settings.py -f 1
  • 15. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Ray tracer on GPU instances Auto-scaled services and rendering API Network Load Balancer (NLB) • Stream images with http/2 push • TCP level load-balancer Serve pre-rendered assets via CDN Caching • Utilize CloudFront caching • Rendering API • Custom caching for http/2
  • 16. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Rasterizer with Elastic GPU Auto Scaling • Only a single fleet of instances • Instances right-sized • Elastic GPU attached Rasterizer engine, e.g. Unity Caching • Pre-rendered assets • Request contains 3D model configuration
  • 17. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Operations Monitor GPU utilization • GPU instances use nvidia-smi to query data • Elastic GPU memory usage Custom CloudWatch metrics from rendering API Auto Scaling • Scale GPU fleet based on custom metrics • Scale up aggressively • Scale down slowly
  • 18. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Amazon CloudWatch metrics
  • 19. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. #!/bin/bash NAMESPACE='GPU/Metrics' # Metrics namespace # Fetch GPU metrics IFS=', ' read -r -a STATS <<< `nvidia-smi --query-gpu=utilization.gpu,utilization.memory -- format=csv,nounits,noheader` # Gathering aws credential data and put it to cloudwatch export AWS_DEFAULT_REGION=`curl -s http://169.254.169.254/latest/meta-data/placement/availability- zone | sed 's/[a-z]$//'` INSTANCE_ID=`curl -s http://169.254.169.254/latest/meta-data/instance-id` # Send values to CloudWatch aws cloudwatch put-metric-data --metric-name Utilization --namespace $NAMESPACE --dimensions "InstanceId=${INSTANCE_ID}" --unit 'Percent' --value ${STATS[0]} aws cloudwatch put-metric-data --metric-name MemoryUtilization --namespace $NAMESPACE --dimensions "InstanceId=${INSTANCE_ID}" --unit 'Percent' --value ${STATS[1]} Monitor GPU instances
  • 20. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Optimizations # Run all commands as root # Query GPU’s nvidia-smi -L # Configure the GPU settings to be persistent. nvidia-smi -pm 1 # Disable the auto boost feature for all GPUs on the instance. nvidia-smi --auto-boost-default=0 # Query clock speeds nvidia-smi -q -d SUPPORTED_CLOCKS #(P3/G3) Set GPU clock speeds to max. frequency. nvidia-smi -ac 2505,1177
  • 21. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Redirect traffic automatically • Serve pre-generated content • Minimize impact during spikes • Safe scaling Lambda@Edge checks GPU health • Network calls on Viewer/Origin requests • 5s/30s timeout • Rewrite request Pre-rendered content
  • 22. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. const https = require('https'); exports.handler = (event, context, callback) => { const request = event.Records[0].cf.request; // Fetch metrics from API endpoint const jsonUrl = 'https://example.com/api/metrics.json'; https.get(jsonUrl, (res) => { let content = ''; res.on('data', (chunk) => { content += chunk; }); res.on('end', () => { const apiStatus = JSON.parse(content); if (Boolean(apiStatus['config']['overloaded'])) // GPU Fleet is under high load request.uri = apiStatus['config']['redirect']; // Rewrite request callback(null, request); }); }); }; Lambda@Edge code example
  • 23. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Make customization the new normal Photorealistic real-time 3D online configurators C u s t o m e r e x a m p l e — M Y C S
  • 24. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. MYCS Photorealistic 3D configurators
  • 25. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. MYCS Highly customizable furniture thanks to modularity
  • 26. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. MYCS Short lead times
  • 27. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. MYCS Affordable premium quality
  • 28. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. 3D configurators MYCS
  • 29. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. What can you expect? Main challenge when building a real-time 3D online configurator • Client-side vs. server-side renderings • Ray tracing • AWS infrastructure • Lessons learned
  • 30. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Photorealism Interactivity (server-side renderings) (client-side WebGL) vs. 3D configurators
  • 31. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Client-side WebGL
  • 32. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Server-side rendering
  • 33. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Photorealism Interactivity (server-side renderings) (client-side WebGL) vs. 3D configurators
  • 34. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Photorealism Interactivity (server-side renderings) (client-side WebGL) vs. 3D configurators
  • 35. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Server-side rendering ● First image arrives within 2 seconds after user interaction ● Progressive streaming of images ● High degree of interactivity ● Cross-device compatibility ● Scalable and affordable Goals ● Not optimized for real-time applications ● Low interactivity ● Steeper learning curve and setup compared to WebGL ● Expensive (GPU servers, licenses, etc.) Downsides
  • 36. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Ray tracing MYCS
  • 37. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Ray tracing Realistic simulation of lighting used to create photorealistic looking images The ray tracer is responsible for performing the necessary computations to cast shadows and light up objects. This means you can create images full of mirrors, transparent surfaces, and object shadows. Source: https://commons.wikimedia.org/wiki/File:Ray_trace_diagram.svg
  • 38. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Ray tracing
  • 39. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. AWS + GPU ray tracing MYCS
  • 40. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Main challenge Rendering speed and (affordable) scalability
  • 41. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Infrastructure v1.0
  • 42. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Infrastructure v1.0
  • 43. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Rendering streaming protocol
  • 44. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Infrastructure v1.0
  • 45. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Infrastructure v2.0
  • 46. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Infrastructure v3.0
  • 47. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Infrastructure v4.0 ( c u r r e n t v e r s i o n )
  • 48. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Infrastructure v5.0 ( i n p r o g r e s s ) HTTP/2 Push
  • 49. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Lessons learned • Aim for the best possible hardware • Don’t be afraid to step deep into rendering topics • Always re-evaluate your infrastructure • Keep most of your energy on the renderer • Don’t just stick to one technology
  • 50. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Thank you! C l a u d i o B r e d f e l d t – C T O - M Y C S C h r i s t o p h K a s s e n – S o l u t i o n s A r c h i t e c t - A W S