SlideShare ist ein Scribd-Unternehmen logo
1 von 56
Downloaden Sie, um offline zu lesen
RAILS APPRAILS APP PERFORMANCEPERFORMANCE
AT THEAT THE LIMITLIMIT
NOVEMBER 2018NOVEMBER 2018
BOGDAN GUSIEVBOGDAN GUSIEV
BOGDAN G.BOGDAN G.
is 10 years in IT
8 years with Ruby and Rails
Long Run Rails Contributor
Active Speaker
SOME OF MY GEMSSOME OF MY GEMS
http://github.com/bogdan
datagrid
js-routes
accepts_values_for
furi
THE SCOPE OF THIS PRESENTATIONTHE SCOPE OF THIS PRESENTATION
App server optimization
Only technologies compatible with rails
Relay on rails tools if we can
THE PLANTHE PLAN
1. General optimization
2. When to optimize specifically?
3. Identify slow parts
4. Targeted Optimization Methods
8 years old startup
A lot of code
Rails version from 2.0 to 5.1
35_000 RPM
2TB sharded database
IS RAILS SLOW?IS RAILS SLOW?
A MINUTE OF SEVERE REALITYA MINUTE OF SEVERE REALITY
HOW SLOW IS ACTION CONTROLLER & ACTION DISPATCH?HOW SLOW IS ACTION CONTROLLER & ACTION DISPATCH?
Everyone's favorite hello-world benchmark
Source:
Framework Reqs/sec % from best
-----------------------------------
rack 15839.64 100.00%
sinatra 3977.30 25.11%
grape 2937.03 18.54%
rails-api 1211.33 7.65%
bench-micro
HOW SLOW ISHOW SLOW IS
ACTIVERECORD?ACTIVERECORD?
sql = "select * from users where id = 1"
# No ActiveRecord
Mysql2::Client~query(sql)
# Connection Query
AR::Base.connection.execute(sql)
# ActiveRecord::Base
User.find(1)
Benchmark Gist
DEV ENVIRONMENT:DEV ENVIRONMENT:
QUERY FROM THE SAME MACHINE AS THE DBQUERY FROM THE SAME MACHINE AS THE DB
AWS RDS EC2 INSTANCE:AWS RDS EC2 INSTANCE:
QUERY FROM A DIFFERENT MACHINE THAN THE DBQUERY FROM A DIFFERENT MACHINE THAN THE DB
No ActiveRecord: 7034.8 i/s
Connection query: 6825.3 i/s - same-ish
ActiveRecord::Base: 1244.8 i/s - 5.65x slower
No ActiveRecord: 3204.2 i/s
Connection query: 2762.6 i/s - 1.16x slower
ActiveRecord::Base: 781.3 i/s - 4.10x slower
NO ACTIVERECORD IMPACTNO ACTIVERECORD IMPACT
Up to 4 times faster
Ugliest API
No code reuse tools
The dev process will be slowed down from 4 times
HOW SLOW IS ACTIONVIEW?HOW SLOW IS ACTIONVIEW?
It is really hard to evaluate.
Hello-world benchmark will not show anything
Main things that impact performance:
Advanced layout structure
Render partials
Helper method calls
Using ActiveRecord inside views
GOOD NEWS ABOUTGOOD NEWS ABOUT
ACTIONVIEWACTIONVIEW
Easy to replace with different technology
Client side rendering is available
OPTIMIZATIONOPTIMIZATION ANTI-PATTERNANTI-PATTERN
Our App is slow, can we make it fast?
Sure!
WHAT ARE YOU GOING TO IMPROVE WITH?WHAT ARE YOU GOING TO IMPROVE WITH?
App Server Container
Changing RDBMS
Ruby interpreter
GENERAL OPTIMIZATIONGENERAL OPTIMIZATION
Worms are not made to move fast
EFFECTIVE DATABASE STRUCTUREEFFECTIVE DATABASE STRUCTURE
IS THE ONLY ONE GENERAL OPTIMIZATIONIS THE ONLY ONE GENERAL OPTIMIZATION
TECHNIQUE WE FOUND USEFULTECHNIQUE WE FOUND USEFUL IN 8 YEARSIN 8 YEARS
GREAT DATABASE SCHEMAGREAT DATABASE SCHEMA
Allows all controllers to do their work efficiently
Reduces the operations using ruby to minimum
Reduces SQL complexity
GOLDEN RULESGOLDEN RULES
Optimize data storage for reading not for writing
Business Rules define the database schema
There is usually only one way that "feels" right
Design efficiently for today
CACHE COLUMNSCACHE COLUMNS
FOREIGN KEY CACHE EXAMPLEFOREIGN KEY CACHE EXAMPLE
Poll.has_many :options
Option.belongs_to :poll
Option.has_many :votes
Vote.belongs_to :option, counter_cache: true
Vote.belongs_to :user
Poll.has_many :votes
Vote.belongs_to :poll, counter_cache: true
Vote.validates_uniqueness_of :poll_id, scope: [:user_id]
JOIN AVOIDANCEJOIN AVOIDANCE
Site.has_many :campaigns
Campaign.has_many :offers
Offer.has_many :offer_shares
OfferShare.has_many :visitor_offers
VisitorOffer.has_many :referrals
Referral.scope :by_site, -> (id) {
joins(visitor_offer: {offer_share: {offer: :campaign}}).
where(campaigns: {site_id: id})
}
add_column :referrals, :site_id
Referral.before_validation do
self.site_id = visitor_offer.offer_share.offer.campaign.site_id
end
REAL EXAMPLE OFREAL EXAMPLE OF
CACHE COLUMNSCACHE COLUMNS
id :integer
referred_origin_id :integer
visitor_offer_id :integer
status :string(20)
webhook_status :string(10)
track_method :string(20)
processed_by :integer
created_at :datetime
updated_at :datetime
processed_at :datetime
offer_id :integer
site_id :integer
campaign_id :integer
advocate_visitor_id :integer
friend_timing :decimal
referred_subtotal :decimal
qa_generated :boolean
ad_rewarded :boolean
CACHE COLUMNSCACHE COLUMNS
BEST PRACTICESBEST PRACTICES
Mostly for read-only data
Remember what is the source and what is cache
Watch the disk space
It is worth it!
SPECIFIC OPTIMIZATIONSPECIFIC OPTIMIZATION
Applied only to problematic pieces
Makes sense for the used functionality
Makes sense only when the functionality is stable
Can be faster than switch to faster technology in general
HOW BUSINESS VIEWS THE OPTIMIZATION?HOW BUSINESS VIEWS THE OPTIMIZATION?
You: Lets Optimize!
Business:
Business says yes when:
Functionality is stable
Feature is being used
Company is making money with it
HOW TO IDENTIFYHOW TO IDENTIFY
THE OPTIMIZATION AREASTHE OPTIMIZATION AREAS
THROUGHPUT BY ACTIONTHROUGHPUT BY ACTION
RESOURCES CONSUMEDRESOURCES CONSUMED
OPTIMIZATIONOPTIMIZATION
MEASUREMENTMEASUREMENT
Average response time
Consumed resources
(pseudocode)
select controller, action, http_method,
sum(duration), average(duration), count(*)
from app_server_requests
TOOLSTOOLS
HTTP access.log
Rails production.log
Kibana
New Relic
Your variant?
SPECIFIC OPTIMIZATIONSPECIFIC OPTIMIZATION
PLANPLAN
1. Define Optimization Metric
2. Measure the metric
3. Zoom in to see optimizable parts
4. Choose optimized fragment and strategy
OPTIMIZATION METHODSOPTIMIZATION METHODS
AVOIDING ACTIVERECORDAVOIDING ACTIVERECORD
Looks awesome on the first glance
Less valuable with effective DB schema
More work with more DB queries
Unreusable code
Caching can be superior
AVOIDING ACTIVERECORD EXAMPLESAVOIDING ACTIVERECORD EXAMPLES
class Campaign
has_many :tags
def tag_names
tags.pluck(:name)
end
end
def offers_created_at_range
scope = offers.reorder(created_at: :asc).limit(1)
scope.pluck(:created_at).first..
scope.reverse_order.pluck(:created_at).first
end
BOGDAN ❤ ACTIVERECORDBOGDAN ❤ ACTIVERECORD
WHY DON'T ALL PEOPLE LOVE ACTIVERECORD?WHY DON'T ALL PEOPLE LOVE ACTIVERECORD?
They don't optimize their schema
They don't realize it does the hardest work
They don't appreaciate the feature-set/performance trade off
ALL MY EXAMPLES ARE CONSIDEREDALL MY EXAMPLES ARE CONSIDERED
MICRO OPTIMIZATIONMICRO OPTIMIZATION
CONDITIONAL GETCONDITIONAL GET
Client GET /products/1827.json
Server Response /products/1827.json
Etag: "2018-10-29 16:36"
Client GET /products/1827.json
If-None-Match: "2018-10-29 16:36"
Server STATUS 304 Not Modified
OR
Response /products/1827.json
Etag: "2018-10-29 16:37"
CONDITIONAL GET TOOLSCONDITIONAL GET TOOLS
class Api::ProductsController < ApplicationController
def show
@product = Product.find(params[:id])
if stale?(last_modified: @product.updated_at,
etag: @product.cache_key)
render json: { product: @product }
end
end
end
Rails Conditional GET Guide
CONDITIONAL GETCONDITIONAL GET
IS GREAT WHENIS GREAT WHEN
A single page is viewed multiple times by the same browser
Lightweight actions
Actions returning JSON
REWRITING WITH RACKREWRITING WITH RACK
1. The action is already under 500ms
2. Heavily loaded action
3. It is painful
4. Looks better than rewriting on Sinatra
CONDITIONAL GET HELD IN RACKCONDITIONAL GET HELD IN RACK
class OffersController < ApplicationController
def show
@offer = Offer.find(params[:id])
digest = SecureRandom.uuid
data = { offer_id: offer.id, cached_at: Time.zone.now, }
Rails.cache.write(digest, data,
expires_in: CACHE_PERIOD.from_now)
response.headers['Cache-Control'] =
'max-age=0, private, must-revalidate'
response.headers['ETag'] = %(W/"#{digest}")
end
end
RACK MIDDLEWARERACK MIDDLEWARE
def call(env)
if fresh?(env['HTTP_IF_NONE_MATCH'])
return [304, {}, ['Not Modified']]
end
@app.call(env)
end
def fresh?(etag_header)
return unless data = Rails.cache.read(digest)
site_id, timestamp =
Offer.where(id: data[:offer_id]).pluck(:site_id, :updated_at)
SettingsChange.where(site_id: site_id, created_at: lookup_period)
!((data[:cached_at]..Time.zone.now).include?(timestamp))
end
INTRODUCE CACHINGINTRODUCE CACHING
1. Find suitable code fragment
2. Measure Cache Hit
3. Use expiration by key
4. Always expire by timeout
5. Expire on deploy
CACHE HITCACHE HIT
How many cache entries will be made?
What is the average size of cache entry?
How many times each entry will be used?
What % of requests will use cache?
How much memory would it take?
CACHE HIT EXAMPLECACHE HIT EXAMPLE
class Campaign
has_many :offers
def cached_offers_count
@offers_count ||= if active?
offers.count
else
# Caching only inactive campaigns
# because they can not get additional offers
Rails.cache.fetch(
["campaign_offers_count", id], expires_in: 1.month) d
offers.count
end
end
end
end
EXPIRATION BY KEYEXPIRATION BY KEY
Manual expiration example
def show
response = Rails.cache.fetch(["products", @product.id]) do
@product.to_json
end
render json: response
end
def update
@product.update!(params[:product])
Rails.cache.delete(["products", @product.id])
end
EXPIRATION BY KEY EXAMPLEEXPIRATION BY KEY EXAMPLE
class ViewStylesheet
def css
# Combining many cache keys here
# to expire whenever any object is updated
cache_key = ['view_setup_css', campaign, self, account]
Rails.cache.fetch(cache_key,
force: template_changed?, expires_in: 3.days) do
Sass.compile(template)
end
end
end
Key-based Expiration from DHH
EXPIRATION BEST PRACTICESEXPIRATION BEST PRACTICES
config.cache_store = :redis_store,
namespace: Deploy.identifier, expires_in: 1.day
RAILS MAGIC ON WORKING WITH CACHERAILS MAGIC ON WORKING WITH CACHE
Variables usage inside ActionView is implicit
Magic is always slow
- cache @projects do
- @projects.each do |project| %>
= render partial: 'projects/project', project
%a{href: project_path(product)}= project.name
.star{class: current_user.bookmarked?(project) ? 'enabled' : ''}
OPTIMIZABLE REQUESTSOPTIMIZABLE REQUESTS
Lightweight
GET method
Used data is explicit
Return JSON but not HTML
Do not use ActionView
WHAT OPTIMIZABLE PAGE SHOULD LOOK LIKE?WHAT OPTIMIZABLE PAGE SHOULD LOOK LIKE?
OPTIMIZATION ❤ CLIENT SIDE RENDERINGOPTIMIZATION ❤ CLIENT SIDE RENDERING
Saves server resources
Parallel load
Makes used data explicit
OPTIMIZATION BYOPTIMIZATION BY
CODE STRUCTURE CHANGECODE STRUCTURE CHANGE
Trivial
Always considered first
Significant
If it gives a huge performance boost
Radical
If you re-think the business process
TRIVIAL CODE STRUCTURE CHANGETRIVIAL CODE STRUCTURE CHANGE
def render_main_template
- view_setup.render_liquid(:main_template, translator, options)
+ template = rendering_cache do
+ view_setup.render_liquid(:main_template, translator, options)
+ end
end
def rendering_cache
# 100 lines of code
end
RESULTS OF GOOD OPTIMIZATIONRESULTS OF GOOD OPTIMIZATION
Throughput 35_000 RPM
Infrastructure Cost $16_000/Month
AWS SETUPAWS SETUP
Instance Type c4.2xlarge
vCPU 8
ECU 31
Memory 15 GiB
Requests 120/second
Per CPU 15/second
THE STRATEGYTHE STRATEGY
1. Generic Optimization
Have the schema always optimized
Add cache columns
2. Ensure specific optimization is needed
Functionality is stable
The performance is measured
3. Apply specific optimization
Use Conditional Get
Rewrite with Rack
Introduce caching
Use direct SQL
ETC

Weitere ähnliche Inhalte

Was ist angesagt?

Application Modernisation with PKS
Application Modernisation with PKSApplication Modernisation with PKS
Application Modernisation with PKSPhil Reay
 
Configs, Configs, Everywhere! (Actually, Let's Simplify All Those Configs)
Configs, Configs, Everywhere! (Actually, Let's Simplify All Those Configs)Configs, Configs, Everywhere! (Actually, Let's Simplify All Those Configs)
Configs, Configs, Everywhere! (Actually, Let's Simplify All Those Configs)Akamai Developers & Admins
 
Accelerate Your C/C++ Applications with Amazon EC2 F1 Instances - CMP402 - re...
Accelerate Your C/C++ Applications with Amazon EC2 F1 Instances - CMP402 - re...Accelerate Your C/C++ Applications with Amazon EC2 F1 Instances - CMP402 - re...
Accelerate Your C/C++ Applications with Amazon EC2 F1 Instances - CMP402 - re...Amazon Web Services
 
Beginners Guide to High Availability for Postgres
Beginners Guide to High Availability for PostgresBeginners Guide to High Availability for Postgres
Beginners Guide to High Availability for PostgresEDB
 
Deep learning acceleration with Amazon Elastic Inference
Deep learning acceleration with Amazon Elastic Inference  Deep learning acceleration with Amazon Elastic Inference
Deep learning acceleration with Amazon Elastic Inference Hagay Lupesko
 
Set Up a Million-Core Cluster to Accelerate HPC Workloads (CMP404) - AWS re:I...
Set Up a Million-Core Cluster to Accelerate HPC Workloads (CMP404) - AWS re:I...Set Up a Million-Core Cluster to Accelerate HPC Workloads (CMP404) - AWS re:I...
Set Up a Million-Core Cluster to Accelerate HPC Workloads (CMP404) - AWS re:I...Amazon Web Services
 
AWS DevDay Cologne - CI/CD for modern applications
AWS DevDay Cologne - CI/CD for modern applicationsAWS DevDay Cologne - CI/CD for modern applications
AWS DevDay Cologne - CI/CD for modern applicationsCobus Bernard
 
CA Workload Automation Product Roadmap - CA Workload Automation Technology Su...
CA Workload Automation Product Roadmap - CA Workload Automation Technology Su...CA Workload Automation Product Roadmap - CA Workload Automation Technology Su...
CA Workload Automation Product Roadmap - CA Workload Automation Technology Su...Extra Technology
 
Ground Breakers Romania: Oracle Autonomous Database
Ground Breakers Romania: Oracle Autonomous DatabaseGround Breakers Romania: Oracle Autonomous Database
Ground Breakers Romania: Oracle Autonomous DatabaseMaria Colgan
 
Running Zeppelin in Enterprise
Running Zeppelin in EnterpriseRunning Zeppelin in Enterprise
Running Zeppelin in EnterpriseDataWorks Summit
 
Best Practices with CA Workload Automation AutoSys (AE)
Best Practices with CA Workload Automation AutoSys (AE)Best Practices with CA Workload Automation AutoSys (AE)
Best Practices with CA Workload Automation AutoSys (AE)CA Technologies
 

Was ist angesagt? (12)

Application Modernisation with PKS
Application Modernisation with PKSApplication Modernisation with PKS
Application Modernisation with PKS
 
Configs, Configs, Everywhere! (Actually, Let's Simplify All Those Configs)
Configs, Configs, Everywhere! (Actually, Let's Simplify All Those Configs)Configs, Configs, Everywhere! (Actually, Let's Simplify All Those Configs)
Configs, Configs, Everywhere! (Actually, Let's Simplify All Those Configs)
 
Accelerate Your C/C++ Applications with Amazon EC2 F1 Instances - CMP402 - re...
Accelerate Your C/C++ Applications with Amazon EC2 F1 Instances - CMP402 - re...Accelerate Your C/C++ Applications with Amazon EC2 F1 Instances - CMP402 - re...
Accelerate Your C/C++ Applications with Amazon EC2 F1 Instances - CMP402 - re...
 
Beginners Guide to High Availability for Postgres
Beginners Guide to High Availability for PostgresBeginners Guide to High Availability for Postgres
Beginners Guide to High Availability for Postgres
 
Deep learning acceleration with Amazon Elastic Inference
Deep learning acceleration with Amazon Elastic Inference  Deep learning acceleration with Amazon Elastic Inference
Deep learning acceleration with Amazon Elastic Inference
 
Set Up a Million-Core Cluster to Accelerate HPC Workloads (CMP404) - AWS re:I...
Set Up a Million-Core Cluster to Accelerate HPC Workloads (CMP404) - AWS re:I...Set Up a Million-Core Cluster to Accelerate HPC Workloads (CMP404) - AWS re:I...
Set Up a Million-Core Cluster to Accelerate HPC Workloads (CMP404) - AWS re:I...
 
Elastic-Engineering
Elastic-EngineeringElastic-Engineering
Elastic-Engineering
 
AWS DevDay Cologne - CI/CD for modern applications
AWS DevDay Cologne - CI/CD for modern applicationsAWS DevDay Cologne - CI/CD for modern applications
AWS DevDay Cologne - CI/CD for modern applications
 
CA Workload Automation Product Roadmap - CA Workload Automation Technology Su...
CA Workload Automation Product Roadmap - CA Workload Automation Technology Su...CA Workload Automation Product Roadmap - CA Workload Automation Technology Su...
CA Workload Automation Product Roadmap - CA Workload Automation Technology Su...
 
Ground Breakers Romania: Oracle Autonomous Database
Ground Breakers Romania: Oracle Autonomous DatabaseGround Breakers Romania: Oracle Autonomous Database
Ground Breakers Romania: Oracle Autonomous Database
 
Running Zeppelin in Enterprise
Running Zeppelin in EnterpriseRunning Zeppelin in Enterprise
Running Zeppelin in Enterprise
 
Best Practices with CA Workload Automation AutoSys (AE)
Best Practices with CA Workload Automation AutoSys (AE)Best Practices with CA Workload Automation AutoSys (AE)
Best Practices with CA Workload Automation AutoSys (AE)
 

Ähnlich wie Rails App performance at the limit - Bogdan Gusiev

Application Modernisation with PKS
Application Modernisation with PKSApplication Modernisation with PKS
Application Modernisation with PKSPhil Reay
 
OSMC 2022 | The Power of Metrics, Logs & Traces with Open Source by Emil-Andr...
OSMC 2022 | The Power of Metrics, Logs & Traces with Open Source by Emil-Andr...OSMC 2022 | The Power of Metrics, Logs & Traces with Open Source by Emil-Andr...
OSMC 2022 | The Power of Metrics, Logs & Traces with Open Source by Emil-Andr...NETWAYS
 
AppDynamics Administration - AppSphere16
AppDynamics Administration - AppSphere16AppDynamics Administration - AppSphere16
AppDynamics Administration - AppSphere16AppDynamics
 
Rethinking Angular Architecture & Performance
Rethinking Angular Architecture & PerformanceRethinking Angular Architecture & Performance
Rethinking Angular Architecture & PerformanceMark Pieszak
 
Using Compass to Diagnose Performance Problems
Using Compass to Diagnose Performance Problems Using Compass to Diagnose Performance Problems
Using Compass to Diagnose Performance Problems MongoDB
 
Using Compass to Diagnose Performance Problems in Your Cluster
Using Compass to Diagnose Performance Problems in Your ClusterUsing Compass to Diagnose Performance Problems in Your Cluster
Using Compass to Diagnose Performance Problems in Your ClusterMongoDB
 
Cloudify Open PaaS Stack for DevOps
Cloudify Open PaaS Stack for DevOps  Cloudify Open PaaS Stack for DevOps
Cloudify Open PaaS Stack for DevOps Nati Shalom
 
App Mod 01: Moving existing apps to the cloud
App Mod 01: Moving existing apps to the cloudApp Mod 01: Moving existing apps to the cloud
App Mod 01: Moving existing apps to the cloudJudy Breedlove
 
Application Acceleration: Faster Performance for End Users
Application Acceleration: Faster Performance for End Users	Application Acceleration: Faster Performance for End Users
Application Acceleration: Faster Performance for End Users Eric Kavanagh
 
Reduce SRE Stress: Minimizing Service Downtime with Grafana, InfluxDB and Tel...
Reduce SRE Stress: Minimizing Service Downtime with Grafana, InfluxDB and Tel...Reduce SRE Stress: Minimizing Service Downtime with Grafana, InfluxDB and Tel...
Reduce SRE Stress: Minimizing Service Downtime with Grafana, InfluxDB and Tel...InfluxData
 
DB2 Real-Time Analytics Meeting Wayne, PA 2015 - IDAA & DB2 Tools Update
DB2 Real-Time Analytics Meeting Wayne, PA 2015 - IDAA & DB2 Tools UpdateDB2 Real-Time Analytics Meeting Wayne, PA 2015 - IDAA & DB2 Tools Update
DB2 Real-Time Analytics Meeting Wayne, PA 2015 - IDAA & DB2 Tools UpdateBaha Majid
 
Red Hat Agile integration workshop - Atlanta
Red Hat Agile integration workshop - AtlantaRed Hat Agile integration workshop - Atlanta
Red Hat Agile integration workshop - AtlantaJudy Breedlove
 
Agile integration workshop Atlanta
Agile integration workshop   AtlantaAgile integration workshop   Atlanta
Agile integration workshop AtlantaJeremy Davis
 
Transforming a Large Mission-Critical E-Commerce Platform from a Relational A...
Transforming a Large Mission-Critical E-Commerce Platform from a Relational A...Transforming a Large Mission-Critical E-Commerce Platform from a Relational A...
Transforming a Large Mission-Critical E-Commerce Platform from a Relational A...MongoDB
 
Spark SQL Adaptive Execution Unleashes The Power of Cluster in Large Scale wi...
Spark SQL Adaptive Execution Unleashes The Power of Cluster in Large Scale wi...Spark SQL Adaptive Execution Unleashes The Power of Cluster in Large Scale wi...
Spark SQL Adaptive Execution Unleashes The Power of Cluster in Large Scale wi...Databricks
 
Next generation business automation with the red hat decision manager and red...
Next generation business automation with the red hat decision manager and red...Next generation business automation with the red hat decision manager and red...
Next generation business automation with the red hat decision manager and red...Masahiko Umeno
 

Ähnlich wie Rails App performance at the limit - Bogdan Gusiev (20)

Application Modernisation with PKS
Application Modernisation with PKSApplication Modernisation with PKS
Application Modernisation with PKS
 
OSMC 2022 | The Power of Metrics, Logs & Traces with Open Source by Emil-Andr...
OSMC 2022 | The Power of Metrics, Logs & Traces with Open Source by Emil-Andr...OSMC 2022 | The Power of Metrics, Logs & Traces with Open Source by Emil-Andr...
OSMC 2022 | The Power of Metrics, Logs & Traces with Open Source by Emil-Andr...
 
AppDynamics Administration - AppSphere16
AppDynamics Administration - AppSphere16AppDynamics Administration - AppSphere16
AppDynamics Administration - AppSphere16
 
Rethinking Angular Architecture & Performance
Rethinking Angular Architecture & PerformanceRethinking Angular Architecture & Performance
Rethinking Angular Architecture & Performance
 
Using Compass to Diagnose Performance Problems
Using Compass to Diagnose Performance Problems Using Compass to Diagnose Performance Problems
Using Compass to Diagnose Performance Problems
 
Using Compass to Diagnose Performance Problems in Your Cluster
Using Compass to Diagnose Performance Problems in Your ClusterUsing Compass to Diagnose Performance Problems in Your Cluster
Using Compass to Diagnose Performance Problems in Your Cluster
 
Cloudify Open PaaS Stack for DevOps
Cloudify Open PaaS Stack for DevOps  Cloudify Open PaaS Stack for DevOps
Cloudify Open PaaS Stack for DevOps
 
App Mod 01: Moving existing apps to the cloud
App Mod 01: Moving existing apps to the cloudApp Mod 01: Moving existing apps to the cloud
App Mod 01: Moving existing apps to the cloud
 
Application Acceleration: Faster Performance for End Users
Application Acceleration: Faster Performance for End Users	Application Acceleration: Faster Performance for End Users
Application Acceleration: Faster Performance for End Users
 
S903 palla
S903 pallaS903 palla
S903 palla
 
Sst hackathon express
Sst hackathon expressSst hackathon express
Sst hackathon express
 
Reduce SRE Stress: Minimizing Service Downtime with Grafana, InfluxDB and Tel...
Reduce SRE Stress: Minimizing Service Downtime with Grafana, InfluxDB and Tel...Reduce SRE Stress: Minimizing Service Downtime with Grafana, InfluxDB and Tel...
Reduce SRE Stress: Minimizing Service Downtime with Grafana, InfluxDB and Tel...
 
Vijendra_resume
Vijendra_resume Vijendra_resume
Vijendra_resume
 
PostgreSQL
PostgreSQL PostgreSQL
PostgreSQL
 
DB2 Real-Time Analytics Meeting Wayne, PA 2015 - IDAA & DB2 Tools Update
DB2 Real-Time Analytics Meeting Wayne, PA 2015 - IDAA & DB2 Tools UpdateDB2 Real-Time Analytics Meeting Wayne, PA 2015 - IDAA & DB2 Tools Update
DB2 Real-Time Analytics Meeting Wayne, PA 2015 - IDAA & DB2 Tools Update
 
Red Hat Agile integration workshop - Atlanta
Red Hat Agile integration workshop - AtlantaRed Hat Agile integration workshop - Atlanta
Red Hat Agile integration workshop - Atlanta
 
Agile integration workshop Atlanta
Agile integration workshop   AtlantaAgile integration workshop   Atlanta
Agile integration workshop Atlanta
 
Transforming a Large Mission-Critical E-Commerce Platform from a Relational A...
Transforming a Large Mission-Critical E-Commerce Platform from a Relational A...Transforming a Large Mission-Critical E-Commerce Platform from a Relational A...
Transforming a Large Mission-Critical E-Commerce Platform from a Relational A...
 
Spark SQL Adaptive Execution Unleashes The Power of Cluster in Large Scale wi...
Spark SQL Adaptive Execution Unleashes The Power of Cluster in Large Scale wi...Spark SQL Adaptive Execution Unleashes The Power of Cluster in Large Scale wi...
Spark SQL Adaptive Execution Unleashes The Power of Cluster in Large Scale wi...
 
Next generation business automation with the red hat decision manager and red...
Next generation business automation with the red hat decision manager and red...Next generation business automation with the red hat decision manager and red...
Next generation business automation with the red hat decision manager and red...
 

Mehr von Ruby Meditation

Is this Legacy or Revenant Code? - Sergey Sergyenko | Ruby Meditation 30
Is this Legacy or Revenant Code? - Sergey Sergyenko  | Ruby Meditation 30Is this Legacy or Revenant Code? - Sergey Sergyenko  | Ruby Meditation 30
Is this Legacy or Revenant Code? - Sergey Sergyenko | Ruby Meditation 30Ruby Meditation
 
Life with GraphQL API: good practices and unresolved issues - Roman Dubrovsky...
Life with GraphQL API: good practices and unresolved issues - Roman Dubrovsky...Life with GraphQL API: good practices and unresolved issues - Roman Dubrovsky...
Life with GraphQL API: good practices and unresolved issues - Roman Dubrovsky...Ruby Meditation
 
Where is your license, dude? - Viacheslav Miroshnychenko | Ruby Meditation 29
Where is your license, dude? - Viacheslav Miroshnychenko | Ruby Meditation 29Where is your license, dude? - Viacheslav Miroshnychenko | Ruby Meditation 29
Where is your license, dude? - Viacheslav Miroshnychenko | Ruby Meditation 29Ruby Meditation
 
Dry-validation update. Dry-validation vs Dry-schema 1.0 - Aleksandra Stolyar ...
Dry-validation update. Dry-validation vs Dry-schema 1.0 - Aleksandra Stolyar ...Dry-validation update. Dry-validation vs Dry-schema 1.0 - Aleksandra Stolyar ...
Dry-validation update. Dry-validation vs Dry-schema 1.0 - Aleksandra Stolyar ...Ruby Meditation
 
How to cook Rabbit on Production - Bohdan Parshentsev | Ruby Meditation 28
How to cook Rabbit on Production - Bohdan Parshentsev | Ruby Meditation 28 How to cook Rabbit on Production - Bohdan Parshentsev | Ruby Meditation 28
How to cook Rabbit on Production - Bohdan Parshentsev | Ruby Meditation 28 Ruby Meditation
 
How to cook Rabbit on Production - Serhiy Nazarov | Ruby Meditation 28
How to cook Rabbit on Production - Serhiy Nazarov | Ruby Meditation 28How to cook Rabbit on Production - Serhiy Nazarov | Ruby Meditation 28
How to cook Rabbit on Production - Serhiy Nazarov | Ruby Meditation 28Ruby Meditation
 
Reinventing the wheel - why do it and how to feel good about it - Julik Tarkh...
Reinventing the wheel - why do it and how to feel good about it - Julik Tarkh...Reinventing the wheel - why do it and how to feel good about it - Julik Tarkh...
Reinventing the wheel - why do it and how to feel good about it - Julik Tarkh...Ruby Meditation
 
Performance Optimization 101 for Ruby developers - Nihad Abbasov (ENG) | Ruby...
Performance Optimization 101 for Ruby developers - Nihad Abbasov (ENG) | Ruby...Performance Optimization 101 for Ruby developers - Nihad Abbasov (ENG) | Ruby...
Performance Optimization 101 for Ruby developers - Nihad Abbasov (ENG) | Ruby...Ruby Meditation
 
Use cases for Serverless Technologies - Ruslan Tolstov (RUS) | Ruby Meditatio...
Use cases for Serverless Technologies - Ruslan Tolstov (RUS) | Ruby Meditatio...Use cases for Serverless Technologies - Ruslan Tolstov (RUS) | Ruby Meditatio...
Use cases for Serverless Technologies - Ruslan Tolstov (RUS) | Ruby Meditatio...Ruby Meditation
 
The Trailblazer Ride from the If Jungle into a Civilised Railway Station - Or...
The Trailblazer Ride from the If Jungle into a Civilised Railway Station - Or...The Trailblazer Ride from the If Jungle into a Civilised Railway Station - Or...
The Trailblazer Ride from the If Jungle into a Civilised Railway Station - Or...Ruby Meditation
 
What/How to do with GraphQL? - Valentyn Ostakh (ENG) | Ruby Meditation 27
What/How to do with GraphQL? - Valentyn Ostakh (ENG) | Ruby Meditation 27What/How to do with GraphQL? - Valentyn Ostakh (ENG) | Ruby Meditation 27
What/How to do with GraphQL? - Valentyn Ostakh (ENG) | Ruby Meditation 27Ruby Meditation
 
New features in Rails 6 - Nihad Abbasov (RUS) | Ruby Meditation 26
New features in Rails 6 -  Nihad Abbasov (RUS) | Ruby Meditation 26New features in Rails 6 -  Nihad Abbasov (RUS) | Ruby Meditation 26
New features in Rails 6 - Nihad Abbasov (RUS) | Ruby Meditation 26Ruby Meditation
 
Security Scanning Overview - Tetiana Chupryna (RUS) | Ruby Meditation 26
Security Scanning Overview - Tetiana Chupryna (RUS) | Ruby Meditation 26Security Scanning Overview - Tetiana Chupryna (RUS) | Ruby Meditation 26
Security Scanning Overview - Tetiana Chupryna (RUS) | Ruby Meditation 26Ruby Meditation
 
Teach your application eloquence. Logs, metrics, traces - Dmytro Shapovalov (...
Teach your application eloquence. Logs, metrics, traces - Dmytro Shapovalov (...Teach your application eloquence. Logs, metrics, traces - Dmytro Shapovalov (...
Teach your application eloquence. Logs, metrics, traces - Dmytro Shapovalov (...Ruby Meditation
 
Best practices. Exploring - Ike Kurghinyan (RUS) | Ruby Meditation 26
Best practices. Exploring - Ike Kurghinyan (RUS) | Ruby Meditation 26Best practices. Exploring - Ike Kurghinyan (RUS) | Ruby Meditation 26
Best practices. Exploring - Ike Kurghinyan (RUS) | Ruby Meditation 26Ruby Meditation
 
Road to A/B testing - Alexey Vasiliev (ENG) | Ruby Meditation 25
Road to A/B testing - Alexey Vasiliev (ENG) | Ruby Meditation 25Road to A/B testing - Alexey Vasiliev (ENG) | Ruby Meditation 25
Road to A/B testing - Alexey Vasiliev (ENG) | Ruby Meditation 25Ruby Meditation
 
Concurrency in production. Real life example - Dmytro Herasymuk | Ruby Medita...
Concurrency in production. Real life example - Dmytro Herasymuk | Ruby Medita...Concurrency in production. Real life example - Dmytro Herasymuk | Ruby Medita...
Concurrency in production. Real life example - Dmytro Herasymuk | Ruby Medita...Ruby Meditation
 
Data encryption for Ruby web applications - Dmytro Shapovalov (RUS) | Ruby Me...
Data encryption for Ruby web applications - Dmytro Shapovalov (RUS) | Ruby Me...Data encryption for Ruby web applications - Dmytro Shapovalov (RUS) | Ruby Me...
Data encryption for Ruby web applications - Dmytro Shapovalov (RUS) | Ruby Me...Ruby Meditation
 
GDPR. Next Y2K in 2018? - Anton Tkachov | Ruby Meditation #23
GDPR. Next Y2K in 2018? - Anton Tkachov | Ruby Meditation #23GDPR. Next Y2K in 2018? - Anton Tkachov | Ruby Meditation #23
GDPR. Next Y2K in 2018? - Anton Tkachov | Ruby Meditation #23Ruby Meditation
 
Postgres vs Elasticsearch while enriching data - Vlad Somov | Ruby Meditaiton...
Postgres vs Elasticsearch while enriching data - Vlad Somov | Ruby Meditaiton...Postgres vs Elasticsearch while enriching data - Vlad Somov | Ruby Meditaiton...
Postgres vs Elasticsearch while enriching data - Vlad Somov | Ruby Meditaiton...Ruby Meditation
 

Mehr von Ruby Meditation (20)

Is this Legacy or Revenant Code? - Sergey Sergyenko | Ruby Meditation 30
Is this Legacy or Revenant Code? - Sergey Sergyenko  | Ruby Meditation 30Is this Legacy or Revenant Code? - Sergey Sergyenko  | Ruby Meditation 30
Is this Legacy or Revenant Code? - Sergey Sergyenko | Ruby Meditation 30
 
Life with GraphQL API: good practices and unresolved issues - Roman Dubrovsky...
Life with GraphQL API: good practices and unresolved issues - Roman Dubrovsky...Life with GraphQL API: good practices and unresolved issues - Roman Dubrovsky...
Life with GraphQL API: good practices and unresolved issues - Roman Dubrovsky...
 
Where is your license, dude? - Viacheslav Miroshnychenko | Ruby Meditation 29
Where is your license, dude? - Viacheslav Miroshnychenko | Ruby Meditation 29Where is your license, dude? - Viacheslav Miroshnychenko | Ruby Meditation 29
Where is your license, dude? - Viacheslav Miroshnychenko | Ruby Meditation 29
 
Dry-validation update. Dry-validation vs Dry-schema 1.0 - Aleksandra Stolyar ...
Dry-validation update. Dry-validation vs Dry-schema 1.0 - Aleksandra Stolyar ...Dry-validation update. Dry-validation vs Dry-schema 1.0 - Aleksandra Stolyar ...
Dry-validation update. Dry-validation vs Dry-schema 1.0 - Aleksandra Stolyar ...
 
How to cook Rabbit on Production - Bohdan Parshentsev | Ruby Meditation 28
How to cook Rabbit on Production - Bohdan Parshentsev | Ruby Meditation 28 How to cook Rabbit on Production - Bohdan Parshentsev | Ruby Meditation 28
How to cook Rabbit on Production - Bohdan Parshentsev | Ruby Meditation 28
 
How to cook Rabbit on Production - Serhiy Nazarov | Ruby Meditation 28
How to cook Rabbit on Production - Serhiy Nazarov | Ruby Meditation 28How to cook Rabbit on Production - Serhiy Nazarov | Ruby Meditation 28
How to cook Rabbit on Production - Serhiy Nazarov | Ruby Meditation 28
 
Reinventing the wheel - why do it and how to feel good about it - Julik Tarkh...
Reinventing the wheel - why do it and how to feel good about it - Julik Tarkh...Reinventing the wheel - why do it and how to feel good about it - Julik Tarkh...
Reinventing the wheel - why do it and how to feel good about it - Julik Tarkh...
 
Performance Optimization 101 for Ruby developers - Nihad Abbasov (ENG) | Ruby...
Performance Optimization 101 for Ruby developers - Nihad Abbasov (ENG) | Ruby...Performance Optimization 101 for Ruby developers - Nihad Abbasov (ENG) | Ruby...
Performance Optimization 101 for Ruby developers - Nihad Abbasov (ENG) | Ruby...
 
Use cases for Serverless Technologies - Ruslan Tolstov (RUS) | Ruby Meditatio...
Use cases for Serverless Technologies - Ruslan Tolstov (RUS) | Ruby Meditatio...Use cases for Serverless Technologies - Ruslan Tolstov (RUS) | Ruby Meditatio...
Use cases for Serverless Technologies - Ruslan Tolstov (RUS) | Ruby Meditatio...
 
The Trailblazer Ride from the If Jungle into a Civilised Railway Station - Or...
The Trailblazer Ride from the If Jungle into a Civilised Railway Station - Or...The Trailblazer Ride from the If Jungle into a Civilised Railway Station - Or...
The Trailblazer Ride from the If Jungle into a Civilised Railway Station - Or...
 
What/How to do with GraphQL? - Valentyn Ostakh (ENG) | Ruby Meditation 27
What/How to do with GraphQL? - Valentyn Ostakh (ENG) | Ruby Meditation 27What/How to do with GraphQL? - Valentyn Ostakh (ENG) | Ruby Meditation 27
What/How to do with GraphQL? - Valentyn Ostakh (ENG) | Ruby Meditation 27
 
New features in Rails 6 - Nihad Abbasov (RUS) | Ruby Meditation 26
New features in Rails 6 -  Nihad Abbasov (RUS) | Ruby Meditation 26New features in Rails 6 -  Nihad Abbasov (RUS) | Ruby Meditation 26
New features in Rails 6 - Nihad Abbasov (RUS) | Ruby Meditation 26
 
Security Scanning Overview - Tetiana Chupryna (RUS) | Ruby Meditation 26
Security Scanning Overview - Tetiana Chupryna (RUS) | Ruby Meditation 26Security Scanning Overview - Tetiana Chupryna (RUS) | Ruby Meditation 26
Security Scanning Overview - Tetiana Chupryna (RUS) | Ruby Meditation 26
 
Teach your application eloquence. Logs, metrics, traces - Dmytro Shapovalov (...
Teach your application eloquence. Logs, metrics, traces - Dmytro Shapovalov (...Teach your application eloquence. Logs, metrics, traces - Dmytro Shapovalov (...
Teach your application eloquence. Logs, metrics, traces - Dmytro Shapovalov (...
 
Best practices. Exploring - Ike Kurghinyan (RUS) | Ruby Meditation 26
Best practices. Exploring - Ike Kurghinyan (RUS) | Ruby Meditation 26Best practices. Exploring - Ike Kurghinyan (RUS) | Ruby Meditation 26
Best practices. Exploring - Ike Kurghinyan (RUS) | Ruby Meditation 26
 
Road to A/B testing - Alexey Vasiliev (ENG) | Ruby Meditation 25
Road to A/B testing - Alexey Vasiliev (ENG) | Ruby Meditation 25Road to A/B testing - Alexey Vasiliev (ENG) | Ruby Meditation 25
Road to A/B testing - Alexey Vasiliev (ENG) | Ruby Meditation 25
 
Concurrency in production. Real life example - Dmytro Herasymuk | Ruby Medita...
Concurrency in production. Real life example - Dmytro Herasymuk | Ruby Medita...Concurrency in production. Real life example - Dmytro Herasymuk | Ruby Medita...
Concurrency in production. Real life example - Dmytro Herasymuk | Ruby Medita...
 
Data encryption for Ruby web applications - Dmytro Shapovalov (RUS) | Ruby Me...
Data encryption for Ruby web applications - Dmytro Shapovalov (RUS) | Ruby Me...Data encryption for Ruby web applications - Dmytro Shapovalov (RUS) | Ruby Me...
Data encryption for Ruby web applications - Dmytro Shapovalov (RUS) | Ruby Me...
 
GDPR. Next Y2K in 2018? - Anton Tkachov | Ruby Meditation #23
GDPR. Next Y2K in 2018? - Anton Tkachov | Ruby Meditation #23GDPR. Next Y2K in 2018? - Anton Tkachov | Ruby Meditation #23
GDPR. Next Y2K in 2018? - Anton Tkachov | Ruby Meditation #23
 
Postgres vs Elasticsearch while enriching data - Vlad Somov | Ruby Meditaiton...
Postgres vs Elasticsearch while enriching data - Vlad Somov | Ruby Meditaiton...Postgres vs Elasticsearch while enriching data - Vlad Somov | Ruby Meditaiton...
Postgres vs Elasticsearch while enriching data - Vlad Somov | Ruby Meditaiton...
 

Kürzlich hochgeladen

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.pptxMalak Abu Hammad
 
Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Allon Mureinik
 
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersEnhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersThousandEyes
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking MenDelhi Call girls
 
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Alan Dix
 
Benefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other FrameworksBenefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other FrameworksSoftradix Technologies
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking MenDelhi Call girls
 
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 3652toLead Limited
 
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationBeyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationSafe Software
 
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticscarlostorres15106
 
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure serviceWhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure servicePooja Nehwal
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slidespraypatel2
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsMark Billinghurst
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationMichael W. Hawkins
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdfhans926745
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)Gabriella Davis
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationSafe Software
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonetsnaman860154
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsEnterprise Knowledge
 
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024BookNet Canada
 

Kürzlich hochgeladen (20)

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
 
Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)
 
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersEnhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
 
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
 
Benefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other FrameworksBenefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other Frameworks
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
 
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
 
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationBeyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
 
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
 
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure serviceWhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slides
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR Systems
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonets
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
 
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
 

Rails App performance at the limit - Bogdan Gusiev

  • 1. RAILS APPRAILS APP PERFORMANCEPERFORMANCE AT THEAT THE LIMITLIMIT NOVEMBER 2018NOVEMBER 2018 BOGDAN GUSIEVBOGDAN GUSIEV
  • 2. BOGDAN G.BOGDAN G. is 10 years in IT 8 years with Ruby and Rails Long Run Rails Contributor Active Speaker
  • 3. SOME OF MY GEMSSOME OF MY GEMS http://github.com/bogdan datagrid js-routes accepts_values_for furi
  • 4. THE SCOPE OF THIS PRESENTATIONTHE SCOPE OF THIS PRESENTATION App server optimization Only technologies compatible with rails Relay on rails tools if we can
  • 5. THE PLANTHE PLAN 1. General optimization 2. When to optimize specifically? 3. Identify slow parts 4. Targeted Optimization Methods
  • 6. 8 years old startup A lot of code Rails version from 2.0 to 5.1 35_000 RPM 2TB sharded database
  • 7. IS RAILS SLOW?IS RAILS SLOW? A MINUTE OF SEVERE REALITYA MINUTE OF SEVERE REALITY
  • 8. HOW SLOW IS ACTION CONTROLLER & ACTION DISPATCH?HOW SLOW IS ACTION CONTROLLER & ACTION DISPATCH? Everyone's favorite hello-world benchmark Source: Framework Reqs/sec % from best ----------------------------------- rack 15839.64 100.00% sinatra 3977.30 25.11% grape 2937.03 18.54% rails-api 1211.33 7.65% bench-micro
  • 9. HOW SLOW ISHOW SLOW IS ACTIVERECORD?ACTIVERECORD? sql = "select * from users where id = 1" # No ActiveRecord Mysql2::Client~query(sql) # Connection Query AR::Base.connection.execute(sql) # ActiveRecord::Base User.find(1) Benchmark Gist
  • 10. DEV ENVIRONMENT:DEV ENVIRONMENT: QUERY FROM THE SAME MACHINE AS THE DBQUERY FROM THE SAME MACHINE AS THE DB AWS RDS EC2 INSTANCE:AWS RDS EC2 INSTANCE: QUERY FROM A DIFFERENT MACHINE THAN THE DBQUERY FROM A DIFFERENT MACHINE THAN THE DB No ActiveRecord: 7034.8 i/s Connection query: 6825.3 i/s - same-ish ActiveRecord::Base: 1244.8 i/s - 5.65x slower No ActiveRecord: 3204.2 i/s Connection query: 2762.6 i/s - 1.16x slower ActiveRecord::Base: 781.3 i/s - 4.10x slower
  • 11. NO ACTIVERECORD IMPACTNO ACTIVERECORD IMPACT Up to 4 times faster Ugliest API No code reuse tools The dev process will be slowed down from 4 times
  • 12. HOW SLOW IS ACTIONVIEW?HOW SLOW IS ACTIONVIEW? It is really hard to evaluate. Hello-world benchmark will not show anything Main things that impact performance: Advanced layout structure Render partials Helper method calls Using ActiveRecord inside views
  • 13. GOOD NEWS ABOUTGOOD NEWS ABOUT ACTIONVIEWACTIONVIEW Easy to replace with different technology Client side rendering is available
  • 14. OPTIMIZATIONOPTIMIZATION ANTI-PATTERNANTI-PATTERN Our App is slow, can we make it fast? Sure!
  • 15. WHAT ARE YOU GOING TO IMPROVE WITH?WHAT ARE YOU GOING TO IMPROVE WITH? App Server Container Changing RDBMS Ruby interpreter
  • 17. EFFECTIVE DATABASE STRUCTUREEFFECTIVE DATABASE STRUCTURE IS THE ONLY ONE GENERAL OPTIMIZATIONIS THE ONLY ONE GENERAL OPTIMIZATION TECHNIQUE WE FOUND USEFULTECHNIQUE WE FOUND USEFUL IN 8 YEARSIN 8 YEARS
  • 18. GREAT DATABASE SCHEMAGREAT DATABASE SCHEMA Allows all controllers to do their work efficiently Reduces the operations using ruby to minimum Reduces SQL complexity
  • 19. GOLDEN RULESGOLDEN RULES Optimize data storage for reading not for writing Business Rules define the database schema There is usually only one way that "feels" right Design efficiently for today
  • 20. CACHE COLUMNSCACHE COLUMNS FOREIGN KEY CACHE EXAMPLEFOREIGN KEY CACHE EXAMPLE Poll.has_many :options Option.belongs_to :poll Option.has_many :votes Vote.belongs_to :option, counter_cache: true Vote.belongs_to :user Poll.has_many :votes Vote.belongs_to :poll, counter_cache: true Vote.validates_uniqueness_of :poll_id, scope: [:user_id]
  • 21. JOIN AVOIDANCEJOIN AVOIDANCE Site.has_many :campaigns Campaign.has_many :offers Offer.has_many :offer_shares OfferShare.has_many :visitor_offers VisitorOffer.has_many :referrals Referral.scope :by_site, -> (id) { joins(visitor_offer: {offer_share: {offer: :campaign}}). where(campaigns: {site_id: id}) } add_column :referrals, :site_id Referral.before_validation do self.site_id = visitor_offer.offer_share.offer.campaign.site_id end
  • 22. REAL EXAMPLE OFREAL EXAMPLE OF CACHE COLUMNSCACHE COLUMNS id :integer referred_origin_id :integer visitor_offer_id :integer status :string(20) webhook_status :string(10) track_method :string(20) processed_by :integer created_at :datetime updated_at :datetime processed_at :datetime offer_id :integer site_id :integer campaign_id :integer advocate_visitor_id :integer friend_timing :decimal referred_subtotal :decimal qa_generated :boolean ad_rewarded :boolean
  • 23. CACHE COLUMNSCACHE COLUMNS BEST PRACTICESBEST PRACTICES Mostly for read-only data Remember what is the source and what is cache Watch the disk space It is worth it!
  • 24. SPECIFIC OPTIMIZATIONSPECIFIC OPTIMIZATION Applied only to problematic pieces Makes sense for the used functionality Makes sense only when the functionality is stable Can be faster than switch to faster technology in general
  • 25. HOW BUSINESS VIEWS THE OPTIMIZATION?HOW BUSINESS VIEWS THE OPTIMIZATION? You: Lets Optimize! Business: Business says yes when: Functionality is stable Feature is being used Company is making money with it
  • 26. HOW TO IDENTIFYHOW TO IDENTIFY THE OPTIMIZATION AREASTHE OPTIMIZATION AREAS
  • 29. OPTIMIZATIONOPTIMIZATION MEASUREMENTMEASUREMENT Average response time Consumed resources (pseudocode) select controller, action, http_method, sum(duration), average(duration), count(*) from app_server_requests
  • 31. SPECIFIC OPTIMIZATIONSPECIFIC OPTIMIZATION PLANPLAN 1. Define Optimization Metric 2. Measure the metric 3. Zoom in to see optimizable parts 4. Choose optimized fragment and strategy
  • 33. AVOIDING ACTIVERECORDAVOIDING ACTIVERECORD Looks awesome on the first glance Less valuable with effective DB schema More work with more DB queries Unreusable code Caching can be superior
  • 34. AVOIDING ACTIVERECORD EXAMPLESAVOIDING ACTIVERECORD EXAMPLES class Campaign has_many :tags def tag_names tags.pluck(:name) end end def offers_created_at_range scope = offers.reorder(created_at: :asc).limit(1) scope.pluck(:created_at).first.. scope.reverse_order.pluck(:created_at).first end
  • 35. BOGDAN ❤ ACTIVERECORDBOGDAN ❤ ACTIVERECORD WHY DON'T ALL PEOPLE LOVE ACTIVERECORD?WHY DON'T ALL PEOPLE LOVE ACTIVERECORD? They don't optimize their schema They don't realize it does the hardest work They don't appreaciate the feature-set/performance trade off ALL MY EXAMPLES ARE CONSIDEREDALL MY EXAMPLES ARE CONSIDERED MICRO OPTIMIZATIONMICRO OPTIMIZATION
  • 36. CONDITIONAL GETCONDITIONAL GET Client GET /products/1827.json Server Response /products/1827.json Etag: "2018-10-29 16:36" Client GET /products/1827.json If-None-Match: "2018-10-29 16:36" Server STATUS 304 Not Modified OR Response /products/1827.json Etag: "2018-10-29 16:37"
  • 37. CONDITIONAL GET TOOLSCONDITIONAL GET TOOLS class Api::ProductsController < ApplicationController def show @product = Product.find(params[:id]) if stale?(last_modified: @product.updated_at, etag: @product.cache_key) render json: { product: @product } end end end Rails Conditional GET Guide
  • 38. CONDITIONAL GETCONDITIONAL GET IS GREAT WHENIS GREAT WHEN A single page is viewed multiple times by the same browser Lightweight actions Actions returning JSON
  • 39. REWRITING WITH RACKREWRITING WITH RACK 1. The action is already under 500ms 2. Heavily loaded action 3. It is painful 4. Looks better than rewriting on Sinatra
  • 40. CONDITIONAL GET HELD IN RACKCONDITIONAL GET HELD IN RACK class OffersController < ApplicationController def show @offer = Offer.find(params[:id]) digest = SecureRandom.uuid data = { offer_id: offer.id, cached_at: Time.zone.now, } Rails.cache.write(digest, data, expires_in: CACHE_PERIOD.from_now) response.headers['Cache-Control'] = 'max-age=0, private, must-revalidate' response.headers['ETag'] = %(W/"#{digest}") end end
  • 41. RACK MIDDLEWARERACK MIDDLEWARE def call(env) if fresh?(env['HTTP_IF_NONE_MATCH']) return [304, {}, ['Not Modified']] end @app.call(env) end def fresh?(etag_header) return unless data = Rails.cache.read(digest) site_id, timestamp = Offer.where(id: data[:offer_id]).pluck(:site_id, :updated_at) SettingsChange.where(site_id: site_id, created_at: lookup_period) !((data[:cached_at]..Time.zone.now).include?(timestamp)) end
  • 42. INTRODUCE CACHINGINTRODUCE CACHING 1. Find suitable code fragment 2. Measure Cache Hit 3. Use expiration by key 4. Always expire by timeout 5. Expire on deploy
  • 43. CACHE HITCACHE HIT How many cache entries will be made? What is the average size of cache entry? How many times each entry will be used? What % of requests will use cache? How much memory would it take?
  • 44. CACHE HIT EXAMPLECACHE HIT EXAMPLE class Campaign has_many :offers def cached_offers_count @offers_count ||= if active? offers.count else # Caching only inactive campaigns # because they can not get additional offers Rails.cache.fetch( ["campaign_offers_count", id], expires_in: 1.month) d offers.count end end end end
  • 45. EXPIRATION BY KEYEXPIRATION BY KEY Manual expiration example def show response = Rails.cache.fetch(["products", @product.id]) do @product.to_json end render json: response end def update @product.update!(params[:product]) Rails.cache.delete(["products", @product.id]) end
  • 46. EXPIRATION BY KEY EXAMPLEEXPIRATION BY KEY EXAMPLE class ViewStylesheet def css # Combining many cache keys here # to expire whenever any object is updated cache_key = ['view_setup_css', campaign, self, account] Rails.cache.fetch(cache_key, force: template_changed?, expires_in: 3.days) do Sass.compile(template) end end end Key-based Expiration from DHH
  • 47. EXPIRATION BEST PRACTICESEXPIRATION BEST PRACTICES config.cache_store = :redis_store, namespace: Deploy.identifier, expires_in: 1.day
  • 48. RAILS MAGIC ON WORKING WITH CACHERAILS MAGIC ON WORKING WITH CACHE Variables usage inside ActionView is implicit Magic is always slow - cache @projects do - @projects.each do |project| %> = render partial: 'projects/project', project %a{href: project_path(product)}= project.name .star{class: current_user.bookmarked?(project) ? 'enabled' : ''}
  • 49. OPTIMIZABLE REQUESTSOPTIMIZABLE REQUESTS Lightweight GET method Used data is explicit Return JSON but not HTML Do not use ActionView
  • 50. WHAT OPTIMIZABLE PAGE SHOULD LOOK LIKE?WHAT OPTIMIZABLE PAGE SHOULD LOOK LIKE?
  • 51. OPTIMIZATION ❤ CLIENT SIDE RENDERINGOPTIMIZATION ❤ CLIENT SIDE RENDERING Saves server resources Parallel load Makes used data explicit
  • 52. OPTIMIZATION BYOPTIMIZATION BY CODE STRUCTURE CHANGECODE STRUCTURE CHANGE Trivial Always considered first Significant If it gives a huge performance boost Radical If you re-think the business process
  • 53. TRIVIAL CODE STRUCTURE CHANGETRIVIAL CODE STRUCTURE CHANGE def render_main_template - view_setup.render_liquid(:main_template, translator, options) + template = rendering_cache do + view_setup.render_liquid(:main_template, translator, options) + end end def rendering_cache # 100 lines of code end
  • 54. RESULTS OF GOOD OPTIMIZATIONRESULTS OF GOOD OPTIMIZATION Throughput 35_000 RPM Infrastructure Cost $16_000/Month
  • 55. AWS SETUPAWS SETUP Instance Type c4.2xlarge vCPU 8 ECU 31 Memory 15 GiB Requests 120/second Per CPU 15/second
  • 56. THE STRATEGYTHE STRATEGY 1. Generic Optimization Have the schema always optimized Add cache columns 2. Ensure specific optimization is needed Functionality is stable The performance is measured 3. Apply specific optimization Use Conditional Get Rewrite with Rack Introduce caching Use direct SQL ETC