SlideShare a Scribd company logo
Top 10 Scalability Mistakes John Coggeshall
Welcome! Who am I: John Coggeshall Chief Technology Officer, Automotive Computer Services Author PHP 5 Unleashed Speaker on PHP-related topics worldwide Geek
What is Scalability? Define: Scalability The ability and flexibility of an application to meet growth requirements of an organization More then making a site go fast(er) Scalability in human resources, for example The “fastest” approach isn’t always the most scalable OO is slower, but more scalable from a code maintenance and reuse standpoint Failure to consider future needs during architectural stages leading to failure of the application’s API to scale
#  The secret to scalability is the ability to design, code, and maintain your applications using the same process again and again regardless of size

Recommended for you

Scaling 101
Scaling 101Scaling 101
Scaling 101

The document provides an overview of scaling principles for web applications, beginning with optimizing a single server application and progressing to more advanced architectures involving load balancing, multiple web/application servers, and multiple database servers. It discusses profiling applications to identify bottlenecks, various caching and optimization strategies, Apache configuration for prefork MPM, and load balancing technologies like DNS round robin, Apache reverse proxy, HAProxy and Pound. Links are provided to additional resources on related topics.

scalingwebapplication
Search in WordPress - how it works and howto customize it
Search in WordPress - how it works and howto customize itSearch in WordPress - how it works and howto customize it
Search in WordPress - how it works and howto customize it

WordPress search customization is a topic we at Seravo get asked about on a frequent basis. There are many different ways to customize the search, and customers understandably want to learn the best practices. The search can be customized quite easily with small changes on PHP code level, and by utilizing MariaDB database’s built-in search functionality. You can also choose a more robust way to do this, and build a new ElasticSearch server just for your case. These slides are from the webinar on January 14th, 2021: https://seravo.com/blog/webinar-search-function-and-how-to-customize-it/

wordpresswordpress peformancewordpress search
Technology tips to ceo & architect
Technology tips to ceo & architectTechnology tips to ceo & architect
Technology tips to ceo & architect

1) The document provides tips for launching a high-scaling enterprise web application or high-traffic website using Amazon Web Services (AWS). 2) It recommends using existing AWS services like S3 for storage, CloudFront for caching, Elasticache for caching objects and database results, and EC2 for application servers rather than reinventing technologies. 3) The document also suggests using services like RDS to launch database instances for storage and CloudSearch for search capabilities.

awsarchitectureecommerce architecture
… .From Traffic To Infrastructure…
“ Scalability marginally impacts procedure, procedure grossly impacts scalability” - Theo Schlossnagle
You have to plan Performance and resource scalability requires forethought and process Version Control Performance Goals Metric measuring Development Mailing Lists API documentation Awareness  is key Think about these problems and how you will solve them as your project gets off the ground
Designing without Scalability If your application does not perform it will likely not succeed What does it mean to perform? 10 requests/sec? 100 requests/sec? 1000 requests/sec? If you don’t know what it will take to meet your performance requirements, you probably won’t meet them. At its worst, you'll be faced with a memorable and sometimes job-ending quote: 'This will never work. You're going to have to start all over.’

Recommended for you

Overview of how to do SEO
Overview of how to do SEOOverview of how to do SEO
Overview of how to do SEO

This document provides an overview of search engine optimization (SEO) techniques for ranking higher in search engine results pages. It recommends focusing on usability and content quality rather than black hat tricks. The biggest influencers on rankings are external links to a page, especially from high page ranked domains. It also outlines where to start with keywords, how search engines calculate results, important on-page elements, and tools for SEO.

faqseo
Intro to-ssdl--lone-star-php-2013
Intro to-ssdl--lone-star-php-2013Intro to-ssdl--lone-star-php-2013
Intro to-ssdl--lone-star-php-2013

This document provides an overview of the Secure Software Development Lifecycle (SSDLC). It discusses how SSDLC differs from traditional development by focusing on security requirements, design, testing, and operations. Key aspects include threat modeling to identify risks, the principle of least privilege, extensive testing and logging, and having policies and response plans for security incidents. The goal of SSDLC is to build resilience, stability, and trust into software through a more proactive and defensive approach throughout the entire development lifecycle.

Hhvm and wordpress
Hhvm and wordpressHhvm and wordpress
Hhvm and wordpress

The document discusses how HHVM (HipHop Virtual Machine), a just-in-time compiler created by Facebook, can improve the performance of PHP-based websites like WordPress by compiling PHP to bytecode faster than traditional PHP processing. It provides benchmarks showing HHVM's performance advantages over PHP-FPM and describes tools like XHProf that can help optimize WordPress sites to take advantage of HHVM's capabilities. While HHVM has risks with poorly coded themes/plugins, its performance gains make it worth considering as an alternative PHP processor.

Performance Metrics Response Time How long does it take for the server to respond to the request? Resource usage CPU, memory, disk I/O, Network I/O Throughput Requests / second Probably the most useful number to keep track of
Proactive vs. Reactive Common Scenario: Reactive Write your app Deploy it Watch it blow up Try to fix it If you’re lucky, you  might  succeed “enough” If you’re unlucky….. Correct Approach: Proactive Know your performance goals up front and make sure your application is living up to them as part of the development process
Everyone has a role in Performance Architects: Balance performance against other application needs Interoperability Security Maintainability Developers: You need to know how to measure and how to optimize to meet the goals Web-stress tools, profilers, etc.
Designing with Scalability When designing your application, you should assume it needs to scale Quick and dirty prototypes often are exactly what gets to production It’s easy to make sure your applications have a decent chance of scaling MySQL: Design assuming someday you’ll need master/server replication, for example

Recommended for you

Use Xdebug to profile PHP
Use Xdebug to profile PHPUse Xdebug to profile PHP
Use Xdebug to profile PHP

Presentation from webinar held on August 19th, 2020, with Xdebug developer Derick Rethans and Seravo CEO Otto Kekäläinen. This presentation shows you how to use Xdebug (which is very easy with the Seravo WordPress development environment!) to make a record of what the WordPress PHP code does during a website page load, and how to use that information to optimize the performance of your WordPress site. For a video recording and Dericks presentation see https://seravo.com/blog/webinar-xdebug-profile-php/

wordpressphpxdebug
Advanced php for web professionals
Advanced php for web professionalsAdvanced php for web professionals
Advanced php for web professionals

This book provides an overview of advanced PHP techniques for building professional web applications. It covers topics like improved session management, multiple database interaction, better form processing, file handling, authentication, error handling, and generating dynamic graphics. The book is intended for PHP developers who want to learn more advanced concepts. It uses numerous code examples to illustrate the techniques.

harisudharshan
Less and faster – Cache tips for WordPress developers
Less and faster – Cache tips for WordPress developersLess and faster – Cache tips for WordPress developers
Less and faster – Cache tips for WordPress developers

Otto Kekäläinen, the code-loving CEO of Seravo held a webinar on May 12, 2020, that focused on the cache: what should a WordPress developer know and which are the best practices to follow?

cachewebweb development
Designing with Scalability Don’t write  an application you’ll need three years from now, write an application you need today Just think about what you might need in three years
Common Performance Blunders The names have been changed to protected the innocent, as well as my wallet.
Network file systems Problem: We have a server farm of 10 servers and we need to deploy our code base Very common problem Many people look to a technology like NFS At least 90% of the time, this is a bad idea NFS/GFS is really slow NFS/GFS has tons of locking issues
Network file systems So how do we deploy our code base? You should always deploy your code base locally on the machine serving it Rsync is your friend What about run-time updates? Accepting File uploads Need to be available to all servers simultaneously Solutions vary depending on needs NFS may be an option for this small portion of the site Database is also an option

Recommended for you

PHP , Internet Business Marketing , & Good Web Content Go Hand In Hand
PHP , Internet Business Marketing , & Good Web Content Go Hand In HandPHP , Internet Business Marketing , & Good Web Content Go Hand In Hand
PHP , Internet Business Marketing , & Good Web Content Go Hand In Hand

PHP scripts allow websites to dynamically generate content which search engines can read as HTML, unlike JavaScript. Forums and blogs are popular PHP scripts that encourage user participation and daily posts, continuously providing new content for search engines. Implementing PHP scripts like forums and blogs is recommended to take advantage of their ability to automatically generate fresh content.

internet marketinginternet businessphp
The Third Screen: Using HTML+CSS to format for Print
The Third Screen: Using HTML+CSS to format for PrintThe Third Screen: Using HTML+CSS to format for Print
The Third Screen: Using HTML+CSS to format for Print

My Webvisions 2015 talk on formatting for print using HTML and CSS, for both websites and non-web content.

htmlcssprint
7 things every web developer should know about linux administration
7 things every web developer should know about linux administration7 things every web developer should know about linux administration
7 things every web developer should know about linux administration

Linux system administration is specialized field in itself. In this presentation, I am going to list 7 Linux administration tasks which a programmer should know to be with ease while deploying or planning deployment of applications.

linuxcronjobsbash
I/O Buffers I/O Buffers are there for a reason, to make things faster Sending 4098 bytes of data to the user when your system write blocks are 4096 bytes is stupid In PHP you can solve this using output buffering At the system level you can also boost up your TCP buffer size Almost always a good idea, most distributions are very conservative here Just be mindful of the amount of RAM you actually have
Ram Disks Ram Disks are a very nice way to improve performance of an application, as long as you have a lot of memory laying around Use Ramdisks to store any sort of data you wouldn’t care if you lost when the 16 year old trips over the power cable A reasonable alternative to shared memory
Bandwidth Optimization You can optimize bandwidth in a few ways Compression mod_deflate Zlib.output_compression=1 (PHP) Content Reduction via Tidy: <?php $o = array(&quot;clean&quot; => true, &quot;drop-proprietary-attributes&quot; => true, &quot;drop-font-tags&quot; => true, &quot;drop-empty-paras&quot; => true, &quot;hide-comments&quot; => true, &quot;join-classes&quot; => true, &quot;join-styles&quot; => true); $tidy = tidy_parse_file(&quot;php.html&quot;, $o);  tidy_clean_repair($tidy); echo $tidy; ?>
Configuring PHP for Speed register_globals = off auto_globals_jit = on magic_quotes_gpc = off expose_php = off register_argc_argv = off always_populate_raw_post_data = off session.use_trans_sid = off session.auto_start = off session.gc_divisor = 10000 output_buffering = 4096

Recommended for you

Odoo - Open Source CMS: A performance comparision
Odoo - Open Source CMS: A performance comparisionOdoo - Open Source CMS: A performance comparision
Odoo - Open Source CMS: A performance comparision

The document compares the performance of four open source content management systems (CMS): Odoo, Drupal, Magento, and Prestashop. It finds that Odoo consistently outperforms the other CMS across a number of metrics: it is 3 times faster than Drupal and 6 times faster than Magento based on load testing; it can handle more users before timing out; and its codebase is smaller. While the other CMS have improvements to make in terms of HTML validation, Odoo represents the best balance of speed, scalability, and maintainability according to the analysis in the document.

 
by Odoo
content management systemcmsopen source
Enterprise PHP
Enterprise PHPEnterprise PHP
Enterprise PHP

- PHP can be used to build enterprise-level applications and integrate with existing enterprise technologies and architectures. While other technologies may be better suited for certain backend tasks, PHP excels at building scalable web applications. - Common enterprise design patterns around scalability, high availability, and integrity can be applied to PHP implementations. Specific patterns also exist for scaling MySQL databases and leveraging Apache modules like mod_rewrite. - PHP applications can interface with Java backends using bridges. This allows leveraging the strengths of each technology by using PHP for the frontend and Java for enterprise services.

Migration Best Practices - SMX London 2018
Migration Best Practices - SMX London 2018Migration Best Practices - SMX London 2018
Migration Best Practices - SMX London 2018

Bastian Grimm provides best practices for successfully relaunching a website through migration. He emphasizes thorough documentation, testing, and addressing all technical details. Common problems with migrations include missing or incorrect redirects. Post-migration, it is important to monitor performance, check for errors, and ensure proper indexing of the new site.

seotechnical seomigration
Blocking calls Blocking I/O can always be a problem in an application I.e. attempting to open a remote URL from within your PHP scripts If the resource is locked / slow / unavailable your script hangs while we wait for a timeout Might as well try to scale an application that has a sleep(30) in it Very bad
Blocking calls Solutions Don’t use blocking calls in your application Don’t use blocking calls in the heavy-load aspects of your application Have out-of-process scripts responsible for pulling down data
Failing to Cache Caching is one of the most important things you can do when writing a scalable application A lot of people don’t realize how much they can cache Rarely is a 5 second cache of any data going to affect user experience Yet it will have significant performance impact 1 page load / 2 queries per request 2 queries * 200 request / sec = 400 queries / second 400 queries * 5 seconds = 2000 queries you didn’t do
Failing to Cache Improving the speed of PHP can be done very easily using an op-code cache PHP 6 will have this ability built-in to the engine

Recommended for you

Surviving Slashdot
Surviving SlashdotSurviving Slashdot
Surviving Slashdot

Technical presentation from 2005 about how to make your web site survive slashdot/digg style mega load.

Proven ways to improve your website performance optimizing front end and back...
Proven ways to improve your website performance optimizing front end and back...Proven ways to improve your website performance optimizing front end and back...
Proven ways to improve your website performance optimizing front end and back...

Looking for proven ways to improve your website performance? Check out performance optimisation tips to enhance the front-end and back-end of your application.

front endback endfullstack
Semi-Static Caching If you're web application has a lot of semi-static content Content that  could change so it has to be stored in the DB, but almost never does .. And you're running on Apache This Design Pattern is killer!
Semi-Static Caching Most people in PHP would implement a page like this: http://www.example.com/show_article.php?id=5 This would be responsible for generating the semi-static page HTML for the browser
Semi-Static Caching Instead of generating the HTML for the browser, make this script generate another PHP script that contains mostly static content Keep things like personalization code, but make the actual article itself static in the file Write the file to disk in a public folder under document root
Semi-Static Caching If you put them in this directory http://www.example.com/articles/5.php You can create a mod_rewrite rule such that http://www.example.com/articles/5.php  maps to http://www.example.com/show_article.php?id=5 Since show_article.php writes articles to files, once it's been generated no more DB reads!

Recommended for you

PHP Development for Google Glass using Phass
PHP Development for Google Glass using PhassPHP Development for Google Glass using Phass
PHP Development for Google Glass using Phass

My talk given at OSCON 2014 on developing Google Glass applications in PHP using Phass -- a free open source platform for Google Glass.

zend framework 2google glassphp
A Photo Jouney In Switzerland
A Photo Jouney In SwitzerlandA Photo Jouney In Switzerland
A Photo Jouney In Switzerland

A partial collection of Pics I took while traveling in Switzerland this May. This is the color version.

travelphotography
PresentacióN Candela, Marina Y Leti
PresentacióN Candela, Marina Y LetiPresentacióN Candela, Marina Y Leti
PresentacióN Candela, Marina Y Leti

El documento presenta los esquemas de iluminación realizados por un grupo de estudiantes de fotografía, incluyendo fotografías tomadas por tres estudiantes usando diferentes modelos, programas de edición y detalles sobre el proceso como el maquillaje y disfraces.

Semi-Static Caching Simple and Elegant Solution Allows you to keep pages “personalized” Very easy to Maintain #
Poor database design  Database design is almost always the most important thing in your application PHP can be used completely properly, but if you mess up the database you’re hosed anyway Take the time to really think about your design Read books on designing relational databases Understand how Indexes work, and use them How Much Data?
Poor database design  For example.. Using MySQL MyISAM tables all the time Use InnoDB instead if you can Use MyISAM tables only if you plan on doing fulltext searching Even then, they shouldn’t be primary tables
Improperly dealing with database connections Improperly using persistent database connections Know your database, MySQL has a relatively light handshake process compared to Oracle Using PHP to deal with database fail over It’s not PHP’s Job, don’t do it.

Recommended for you

Pwp Alex, Kiko Y Cris
Pwp Alex, Kiko Y CrisPwp Alex, Kiko Y Cris
Pwp Alex, Kiko Y Cris

Este documento presenta esquemas de iluminación para fotografía en blanco y negro y a color tomados de libros sobre iluminación fotográfica. Los esquemas son presentados por un grupo de estudiantes de la Escuela de Arte de Sevilla para su práctica sobre iluminación en el estudio fotográfico.

Advertising 3
Advertising  3Advertising  3
Advertising 3

The document provides an overview of advertising targeted towards children. It discusses where advertisements can be found, different types of advertisements, how advertising works, legislation around children's advertising, and concerns around unhealthy advertising influences. It also describes techniques used in advertising, including using celebrities or "real people", marketing directly to teens, and potentially misleading claims.

 
by MrG
Pwp Blanca, Diana Y Edu
Pwp Blanca, Diana Y EduPwp Blanca, Diana Y Edu
Pwp Blanca, Diana Y Edu

La Escuela de Arte de Sevilla ofrece un curso de fotografía artística para el grupo 5B, en el que participan los estudiantes Eduardo Blanca y Diana.

Let me say that again.. I DO NOT CARE WHAT IT SAYS IN SOME BOOK, DO NOT USE PHP TO DETERMINE WHICH DATABASE TO CONNECT TO
Database connections Bad: Code to determine if it is the dev environment or not and a different database is selected in each case Suicidal: Code to determine if the primary master in a MySQL database is down, and instead attempt to seamlessly roll-over to a hot swap MySQL slave you bless as master GOOD: MySQL Proxy
Having your Cake and Eating it too For those of us using MySQL, here’s a great replication trick from our friends at Flickr InnoDB is under most circumstances considerably faster then MyISAM MyISAM is considerably better suited for full-text searches Trick: During a master/slave replication, the slave table type can change Set up a separate MyISAM fulltext search farm Connect to those servers when performing full-text searches
 

Recommended for you

PresentacióN Samu Y MaríA
PresentacióN Samu Y MaríAPresentacióN Samu Y MaríA
PresentacióN Samu Y MaríA

Este documento presenta los diferentes tipos de iluminación que se pueden usar en un estudio fotográfico, incluyendo luz de 3/4, luz lateral, luz lateral con relleno, contraluz para silueta y para luz de borde, iluminación cenital, nadir y cruzada. El documento fue creado por Samuel J. Salado y María Gómez como parte de un curso de fotografía.

Pwp Alex, Kiko Y Cris
Pwp Alex, Kiko Y CrisPwp Alex, Kiko Y Cris
Pwp Alex, Kiko Y Cris

Este documento presenta esquemas de iluminación para fotografía en blanco y negro y a color tomados de libros sobre iluminación fotográfica. Los esquemas son presentados por un grupo de estudiantes de la Escuela de Arte de Sevilla para su práctica sobre iluminación en el estudio fotográfico.

scale_perf_best_practices
scale_perf_best_practicesscale_perf_best_practices
scale_perf_best_practices

The document discusses best practices for scalability and performance when developing PHP applications. Some key points include profiling and optimizing early, cooperating between development and operations teams, testing on production-like data, caching frequently accessed data, avoiding overuse of hard-to-scale resources, and using compiler caching and query optimization. Decoupling applications, caching, data federation, and replication are also presented as techniques for improving scalability.

SQLite, Huh? SQLite is a great database package for PHP that can really speed certain things up Requires you understanding when and how to use it. SQLite is basically a flat-file embedded database Crazy-fast reads, horrible writes (full database locks) Answer: SQLite is a  great  lookup database
Keepalive Requests Keepalive sounds great on paper It can actually totally hose you if you aren’t careful Use Keepalive if: You use the same server for static/dynamic content You intelligently know how to set the timeout No Keepalive request should last more then 10 seconds If Apache is 100% Dynamic  Turn it off
Knowing where to  Not  optimize Sooner or later, you (likely) will worry about optimization Hopefully, you didn’t start after your application started blowing up (aka Twitter) When trying to make scalability decisions knowledge is the most important thing you can have
Knowing where to  Not  optimize PHP has both closed source and open source profilers which do an excellent job of identifying the bottlenecks in your application vmstat, iostat are your friends Optimize where it counts

Recommended for you

Scalable talk notes
Scalable talk notesScalable talk notes
Scalable talk notes

This document summarizes techniques for building scalable websites with Perl, including caching whole pages, chunks of HTML/data, and using job queuing. Caching helps performance by reducing workload and scalability by lowering database load. Large sites like Yahoo cache aggressively. Job queuing prevents overloading resources and keeps websites responsive under high demand by lining requests up in a queue.

perl
Lamp Stack Optimization
Lamp Stack OptimizationLamp Stack Optimization
Lamp Stack Optimization

Mike Creuzer's presentation on LAMP optimization for the October, 2009 meeting of the Suburban Chicago PHP & Web Development Meetup

linuxmysqlphp
Domino server and application performance in the real world
Domino server and application performance in the real worldDomino server and application performance in the real world
Domino server and application performance in the real world

The document provides tips and strategies for optimizing Domino server performance, with a focus on addressing disk I/O bottlenecks. It recommends separating database files onto different physical disks based on I/O needs, avoiding journaling file systems for transaction logs, optimizing RAID configurations, and addressing inefficient views and design patterns that can degrade performance. Specific issues covered include transaction logging, indexing, database design, and application usage patterns.

dominoserverperformance
Instrumentation of your applications is key to determining what matters most when optimizing If you’re not logging, you’re shooting in the dark White-box monitoring of your applications via tools like Zend Platform are enormously helpful in understanding what is going on You can’t make good process (or business) decisions unless you understand how your web site is being used and by whom . Knowing where to  Not  optimize
Amdahl’s Law: Improving code execution time by 50% when the code executes only 2% of the time will result in a 1% overall improvement Improving code execution time by 10% when the code executes 80% of the time will result in a 8% overall improvement Knowing where to  Not  optimize
Use Profilers Profilers are  easy  to use Profilers draw pretty pictures Profilers are good Use profilers
How a Profiler/Debugger works in PHP  Profiler / Debuggers in PHP work remotely against the web server

Recommended for you

Scaling Web Apps P Falcone
Scaling Web Apps P FalconeScaling Web Apps P Falcone
Scaling Web Apps P Falcone

To scale PHP web applications: 1) Focus on fundamentals like testable code, efficient data structures and algorithms, and designing for change. 2) Optimize performance through caching, using databases efficiently, and leveraging PHP features. 3) Employ techniques like asynchronous processing, parallel computing, and service-oriented architectures to spread load across servers.

 
by jedt
30 Skills to Master to Become a Senior Software Engineer
30 Skills to Master to Become a Senior Software Engineer30 Skills to Master to Become a Senior Software Engineer
30 Skills to Master to Become a Senior Software Engineer

The document discusses 30 skills that software engineers should master to become senior engineers, including skills with programming languages like PHP, databases, SQL, HTML, CSS, JavaScript frameworks, build tools like Gulp, version control with Git, server-side frameworks like Laravel, object-relational mappers, and using database seeding and migrations. It emphasizes the importance of being well-rounded and having experience with both front-end and back-end technologies as well as tools that improve productivity and maintainability. Mastering these skills can lead to higher salaries, more leadership opportunities, and building more robust applications.

software engineeeringlaravelsoftware development
Front Range PHP NoSQL Databases
Front Range PHP NoSQL DatabasesFront Range PHP NoSQL Databases
Front Range PHP NoSQL Databases

NoSQL databases are non-relational databases designed for large volumes of data across many servers. They emerged to address scaling and reliability issues with relational databases. While different technologies, NoSQL databases are designed for distribution without a single point of failure and to sacrifice consistency for availability if needed. Examples include Dynamo, BigTable, Cassandra and CouchDB.

nosql frphp
Tips on using a profiler When doing real performance analysis, here are a few tips to help you out: Copy the raw data (function execution times) into a spreadsheet and do analysis from there Most profilers provide at least two execution figures per function call The amount of time spent executing PHP code The amount of time PHP spent internally That means total = A + B  If you are spending a lot more time inside of PHP, you’ve got a blocking issue somewhere
Something More.. Do not mistake something more for something better Dev: “Hey, let’s build this great ORM that automatically generates it’s views like Ruby!” Manager: “Sounds great, go to it” <4 months pass> Dev: “Here’s my two weeks notice, I quit” Manager: “Okay John you write it” John: “Um, I have no idea what this guy did” <2 months pass to re-write the module in a way that we can maintain it>
Something More.. Don’t use a sledge hammer when a tack hammer will do Devs: Just because your boss doesn’t know the difference doesn’t make it a good idea It might seem like great job security to write code only you can maintain, but in reality all it will do is get you fired faster when they figure it out Managers: Know enough about the technologies to keep eager developers from leaving you holding the bag.
Final Thoughts #  Ultimately the secret of scalability is developing applications and procedures which scale both  UP   AND   DOWN You have to be able to afford to make the application to begin with You have to be able to afford to make the application ten times bigger then it is Without process, you will fail. REMEMBER:  In ANY application, there is only ever one bottleneck Questions?

Recommended for you

Web20expo Scalable Web Arch
Web20expo Scalable Web ArchWeb20expo Scalable Web Arch
Web20expo Scalable Web Arch

The document discusses scalable web architectures and common patterns for scaling web applications. It covers key topics like load balancing, caching, database replication, and data federation. The overall goal of application architecture is to scale traffic and data while maintaining high availability and performance. Horizontal scaling by adding more servers is preferable to vertical scaling of buying larger servers.

Web20expo Scalable Web Arch
Web20expo Scalable Web ArchWeb20expo Scalable Web Arch
Web20expo Scalable Web Arch

The document discusses scalable web architectures and common patterns for scaling web applications. It covers key topics like load balancing, caching, database replication and sharding, and asynchronous queuing to distribute workloads across multiple servers. The goal of these patterns is to scale traffic, data size, and maintainability through horizontal expansion rather than just vertical upgrades.

Web20expo Scalable Web Arch
Web20expo Scalable Web ArchWeb20expo Scalable Web Arch
Web20expo Scalable Web Arch

The document discusses scalable web architectures and common patterns for scaling web applications. It covers key topics like load balancing, caching, database replication and sharding, and asynchronous queuing to distribute workloads across multiple servers. The goal of these patterns is to scale traffic, data size, and maintainability through horizontal expansion rather than just vertical upgrades.

More Related Content

What's hot

PDF Generation in Rails with Prawn and Prawn-to: John McCaffrey
PDF Generation in Rails with Prawn and Prawn-to: John McCaffreyPDF Generation in Rails with Prawn and Prawn-to: John McCaffrey
PDF Generation in Rails with Prawn and Prawn-to: John McCaffrey
John McCaffrey
 
2019 StartIT - Boosting your performance with Blackfire
2019 StartIT - Boosting your performance with Blackfire2019 StartIT - Boosting your performance with Blackfire
2019 StartIT - Boosting your performance with Blackfire
Marko Mitranić
 
Bigtop elancesmallrev1
Bigtop elancesmallrev1Bigtop elancesmallrev1
Bigtop elancesmallrev1
Doug Chang
 
Scaling 101
Scaling 101Scaling 101
Scaling 101
Chris Finne
 
Search in WordPress - how it works and howto customize it
Search in WordPress - how it works and howto customize itSearch in WordPress - how it works and howto customize it
Search in WordPress - how it works and howto customize it
Otto Kekäläinen
 
Technology tips to ceo & architect
Technology tips to ceo & architectTechnology tips to ceo & architect
Technology tips to ceo & architect
Anandkumar R
 
Overview of how to do SEO
Overview of how to do SEOOverview of how to do SEO
Overview of how to do SEO
Chris Finne
 
Intro to-ssdl--lone-star-php-2013
Intro to-ssdl--lone-star-php-2013Intro to-ssdl--lone-star-php-2013
Intro to-ssdl--lone-star-php-2013
nanderoo
 
Hhvm and wordpress
Hhvm and wordpressHhvm and wordpress
Hhvm and wordpress
Mark Kelnar
 
Use Xdebug to profile PHP
Use Xdebug to profile PHPUse Xdebug to profile PHP
Use Xdebug to profile PHP
Seravo
 
Advanced php for web professionals
Advanced php for web professionalsAdvanced php for web professionals
Advanced php for web professionals
Sudha Hari Tech Solution Pvt ltd
 
Less and faster – Cache tips for WordPress developers
Less and faster – Cache tips for WordPress developersLess and faster – Cache tips for WordPress developers
Less and faster – Cache tips for WordPress developers
Seravo
 
PHP , Internet Business Marketing , & Good Web Content Go Hand In Hand
PHP , Internet Business Marketing , & Good Web Content Go Hand In HandPHP , Internet Business Marketing , & Good Web Content Go Hand In Hand
PHP , Internet Business Marketing , & Good Web Content Go Hand In Hand
silpine2
 
The Third Screen: Using HTML+CSS to format for Print
The Third Screen: Using HTML+CSS to format for PrintThe Third Screen: Using HTML+CSS to format for Print
The Third Screen: Using HTML+CSS to format for Print
William Hertling
 
7 things every web developer should know about linux administration
7 things every web developer should know about linux administration7 things every web developer should know about linux administration
7 things every web developer should know about linux administration
Zareef Ahmed
 
Odoo - Open Source CMS: A performance comparision
Odoo - Open Source CMS: A performance comparisionOdoo - Open Source CMS: A performance comparision
Odoo - Open Source CMS: A performance comparision
Odoo
 
Enterprise PHP
Enterprise PHPEnterprise PHP
Enterprise PHP
John Coggeshall
 
Migration Best Practices - SMX London 2018
Migration Best Practices - SMX London 2018Migration Best Practices - SMX London 2018
Migration Best Practices - SMX London 2018
Bastian Grimm
 
Surviving Slashdot
Surviving SlashdotSurviving Slashdot
Surviving Slashdot
johnbuckman
 
Proven ways to improve your website performance optimizing front end and back...
Proven ways to improve your website performance optimizing front end and back...Proven ways to improve your website performance optimizing front end and back...
Proven ways to improve your website performance optimizing front end and back...
Katy Slemon
 

What's hot (20)

PDF Generation in Rails with Prawn and Prawn-to: John McCaffrey
PDF Generation in Rails with Prawn and Prawn-to: John McCaffreyPDF Generation in Rails with Prawn and Prawn-to: John McCaffrey
PDF Generation in Rails with Prawn and Prawn-to: John McCaffrey
 
2019 StartIT - Boosting your performance with Blackfire
2019 StartIT - Boosting your performance with Blackfire2019 StartIT - Boosting your performance with Blackfire
2019 StartIT - Boosting your performance with Blackfire
 
Bigtop elancesmallrev1
Bigtop elancesmallrev1Bigtop elancesmallrev1
Bigtop elancesmallrev1
 
Scaling 101
Scaling 101Scaling 101
Scaling 101
 
Search in WordPress - how it works and howto customize it
Search in WordPress - how it works and howto customize itSearch in WordPress - how it works and howto customize it
Search in WordPress - how it works and howto customize it
 
Technology tips to ceo & architect
Technology tips to ceo & architectTechnology tips to ceo & architect
Technology tips to ceo & architect
 
Overview of how to do SEO
Overview of how to do SEOOverview of how to do SEO
Overview of how to do SEO
 
Intro to-ssdl--lone-star-php-2013
Intro to-ssdl--lone-star-php-2013Intro to-ssdl--lone-star-php-2013
Intro to-ssdl--lone-star-php-2013
 
Hhvm and wordpress
Hhvm and wordpressHhvm and wordpress
Hhvm and wordpress
 
Use Xdebug to profile PHP
Use Xdebug to profile PHPUse Xdebug to profile PHP
Use Xdebug to profile PHP
 
Advanced php for web professionals
Advanced php for web professionalsAdvanced php for web professionals
Advanced php for web professionals
 
Less and faster – Cache tips for WordPress developers
Less and faster – Cache tips for WordPress developersLess and faster – Cache tips for WordPress developers
Less and faster – Cache tips for WordPress developers
 
PHP , Internet Business Marketing , & Good Web Content Go Hand In Hand
PHP , Internet Business Marketing , & Good Web Content Go Hand In HandPHP , Internet Business Marketing , & Good Web Content Go Hand In Hand
PHP , Internet Business Marketing , & Good Web Content Go Hand In Hand
 
The Third Screen: Using HTML+CSS to format for Print
The Third Screen: Using HTML+CSS to format for PrintThe Third Screen: Using HTML+CSS to format for Print
The Third Screen: Using HTML+CSS to format for Print
 
7 things every web developer should know about linux administration
7 things every web developer should know about linux administration7 things every web developer should know about linux administration
7 things every web developer should know about linux administration
 
Odoo - Open Source CMS: A performance comparision
Odoo - Open Source CMS: A performance comparisionOdoo - Open Source CMS: A performance comparision
Odoo - Open Source CMS: A performance comparision
 
Enterprise PHP
Enterprise PHPEnterprise PHP
Enterprise PHP
 
Migration Best Practices - SMX London 2018
Migration Best Practices - SMX London 2018Migration Best Practices - SMX London 2018
Migration Best Practices - SMX London 2018
 
Surviving Slashdot
Surviving SlashdotSurviving Slashdot
Surviving Slashdot
 
Proven ways to improve your website performance optimizing front end and back...
Proven ways to improve your website performance optimizing front end and back...Proven ways to improve your website performance optimizing front end and back...
Proven ways to improve your website performance optimizing front end and back...
 

Viewers also liked

PHP Development for Google Glass using Phass
PHP Development for Google Glass using PhassPHP Development for Google Glass using Phass
PHP Development for Google Glass using Phass
John Coggeshall
 
A Photo Jouney In Switzerland
A Photo Jouney In SwitzerlandA Photo Jouney In Switzerland
A Photo Jouney In Switzerland
Jia Liu
 
PresentacióN Candela, Marina Y Leti
PresentacióN Candela, Marina Y LetiPresentacióN Candela, Marina Y Leti
PresentacióN Candela, Marina Y Leti
edudacosta.foto
 
Pwp Alex, Kiko Y Cris
Pwp Alex, Kiko Y CrisPwp Alex, Kiko Y Cris
Pwp Alex, Kiko Y Cris
edudacosta.foto
 
Advertising 3
Advertising  3Advertising  3
Advertising 3
MrG
 
Pwp Blanca, Diana Y Edu
Pwp Blanca, Diana Y EduPwp Blanca, Diana Y Edu
Pwp Blanca, Diana Y Edu
edudacosta.foto
 
PresentacióN Samu Y MaríA
PresentacióN Samu Y MaríAPresentacióN Samu Y MaríA
PresentacióN Samu Y MaríA
edudacosta.foto
 
Pwp Alex, Kiko Y Cris
Pwp Alex, Kiko Y CrisPwp Alex, Kiko Y Cris
Pwp Alex, Kiko Y Cris
edudacosta.foto
 

Viewers also liked (9)

Iluminacion uno
Iluminacion unoIluminacion uno
Iluminacion uno
 
PHP Development for Google Glass using Phass
PHP Development for Google Glass using PhassPHP Development for Google Glass using Phass
PHP Development for Google Glass using Phass
 
A Photo Jouney In Switzerland
A Photo Jouney In SwitzerlandA Photo Jouney In Switzerland
A Photo Jouney In Switzerland
 
PresentacióN Candela, Marina Y Leti
PresentacióN Candela, Marina Y LetiPresentacióN Candela, Marina Y Leti
PresentacióN Candela, Marina Y Leti
 
Pwp Alex, Kiko Y Cris
Pwp Alex, Kiko Y CrisPwp Alex, Kiko Y Cris
Pwp Alex, Kiko Y Cris
 
Advertising 3
Advertising  3Advertising  3
Advertising 3
 
Pwp Blanca, Diana Y Edu
Pwp Blanca, Diana Y EduPwp Blanca, Diana Y Edu
Pwp Blanca, Diana Y Edu
 
PresentacióN Samu Y MaríA
PresentacióN Samu Y MaríAPresentacióN Samu Y MaríA
PresentacióN Samu Y MaríA
 
Pwp Alex, Kiko Y Cris
Pwp Alex, Kiko Y CrisPwp Alex, Kiko Y Cris
Pwp Alex, Kiko Y Cris
 

Similar to Apache Con 2008 Top 10 Mistakes

scale_perf_best_practices
scale_perf_best_practicesscale_perf_best_practices
scale_perf_best_practices
webuploader
 
Scalable talk notes
Scalable talk notesScalable talk notes
Scalable talk notes
Perrin Harkins
 
Lamp Stack Optimization
Lamp Stack OptimizationLamp Stack Optimization
Lamp Stack Optimization
Dave Ross
 
Domino server and application performance in the real world
Domino server and application performance in the real worldDomino server and application performance in the real world
Domino server and application performance in the real world
dominion
 
Scaling Web Apps P Falcone
Scaling Web Apps P FalconeScaling Web Apps P Falcone
Scaling Web Apps P Falcone
jedt
 
30 Skills to Master to Become a Senior Software Engineer
30 Skills to Master to Become a Senior Software Engineer30 Skills to Master to Become a Senior Software Engineer
30 Skills to Master to Become a Senior Software Engineer
Sean Coates
 
Front Range PHP NoSQL Databases
Front Range PHP NoSQL DatabasesFront Range PHP NoSQL Databases
Front Range PHP NoSQL Databases
Jon Meredith
 
Web20expo Scalable Web Arch
Web20expo Scalable Web ArchWeb20expo Scalable Web Arch
Web20expo Scalable Web Arch
guest18a0f1
 
Web20expo Scalable Web Arch
Web20expo Scalable Web ArchWeb20expo Scalable Web Arch
Web20expo Scalable Web Arch
mclee
 
Web20expo Scalable Web Arch
Web20expo Scalable Web ArchWeb20expo Scalable Web Arch
Web20expo Scalable Web Arch
royans
 
UnConference for Georgia Southern Computer Science March 31, 2015
UnConference for Georgia Southern Computer Science March 31, 2015UnConference for Georgia Southern Computer Science March 31, 2015
UnConference for Georgia Southern Computer Science March 31, 2015
Christopher Curtin
 
The Guide to becoming a full stack developer in 2018
The Guide to becoming a full stack developer in 2018The Guide to becoming a full stack developer in 2018
The Guide to becoming a full stack developer in 2018
Amit Ashwini
 
InterConPHP 2014 - Scaling PHP
InterConPHP 2014 - Scaling PHPInterConPHP 2014 - Scaling PHP
InterConPHP 2014 - Scaling PHP
Lucas Arruda
 
Scaling PHP apps
Scaling PHP appsScaling PHP apps
Scaling PHP apps
Matteo Moretti
 
Web Speed And Scalability
Web Speed And ScalabilityWeb Speed And Scalability
Web Speed And Scalability
Jason Ragsdale
 
Scalable Web Architectures: Common Patterns and Approaches - Web 2.0 Expo NYC
Scalable Web Architectures: Common Patterns and Approaches - Web 2.0 Expo NYCScalable Web Architectures: Common Patterns and Approaches - Web 2.0 Expo NYC
Scalable Web Architectures: Common Patterns and Approaches - Web 2.0 Expo NYC
Cal Henderson
 
Improving Drupal Performances
Improving Drupal PerformancesImproving Drupal Performances
Improving Drupal Performances
Vladimir Ilic
 
Scalable Web Architectures - Common Patterns & Approaches
Scalable Web Architectures - Common Patterns & ApproachesScalable Web Architectures - Common Patterns & Approaches
Scalable Web Architectures - Common Patterns & Approaches
Cal Henderson
 
Scalable Web Arch
Scalable Web ArchScalable Web Arch
Scalable Web Arch
royans
 
Redis and Bloom Filters - Atlanta Java Users Group 9/2014
Redis and Bloom Filters - Atlanta Java Users Group 9/2014Redis and Bloom Filters - Atlanta Java Users Group 9/2014
Redis and Bloom Filters - Atlanta Java Users Group 9/2014
Christopher Curtin
 

Similar to Apache Con 2008 Top 10 Mistakes (20)

scale_perf_best_practices
scale_perf_best_practicesscale_perf_best_practices
scale_perf_best_practices
 
Scalable talk notes
Scalable talk notesScalable talk notes
Scalable talk notes
 
Lamp Stack Optimization
Lamp Stack OptimizationLamp Stack Optimization
Lamp Stack Optimization
 
Domino server and application performance in the real world
Domino server and application performance in the real worldDomino server and application performance in the real world
Domino server and application performance in the real world
 
Scaling Web Apps P Falcone
Scaling Web Apps P FalconeScaling Web Apps P Falcone
Scaling Web Apps P Falcone
 
30 Skills to Master to Become a Senior Software Engineer
30 Skills to Master to Become a Senior Software Engineer30 Skills to Master to Become a Senior Software Engineer
30 Skills to Master to Become a Senior Software Engineer
 
Front Range PHP NoSQL Databases
Front Range PHP NoSQL DatabasesFront Range PHP NoSQL Databases
Front Range PHP NoSQL Databases
 
Web20expo Scalable Web Arch
Web20expo Scalable Web ArchWeb20expo Scalable Web Arch
Web20expo Scalable Web Arch
 
Web20expo Scalable Web Arch
Web20expo Scalable Web ArchWeb20expo Scalable Web Arch
Web20expo Scalable Web Arch
 
Web20expo Scalable Web Arch
Web20expo Scalable Web ArchWeb20expo Scalable Web Arch
Web20expo Scalable Web Arch
 
UnConference for Georgia Southern Computer Science March 31, 2015
UnConference for Georgia Southern Computer Science March 31, 2015UnConference for Georgia Southern Computer Science March 31, 2015
UnConference for Georgia Southern Computer Science March 31, 2015
 
The Guide to becoming a full stack developer in 2018
The Guide to becoming a full stack developer in 2018The Guide to becoming a full stack developer in 2018
The Guide to becoming a full stack developer in 2018
 
InterConPHP 2014 - Scaling PHP
InterConPHP 2014 - Scaling PHPInterConPHP 2014 - Scaling PHP
InterConPHP 2014 - Scaling PHP
 
Scaling PHP apps
Scaling PHP appsScaling PHP apps
Scaling PHP apps
 
Web Speed And Scalability
Web Speed And ScalabilityWeb Speed And Scalability
Web Speed And Scalability
 
Scalable Web Architectures: Common Patterns and Approaches - Web 2.0 Expo NYC
Scalable Web Architectures: Common Patterns and Approaches - Web 2.0 Expo NYCScalable Web Architectures: Common Patterns and Approaches - Web 2.0 Expo NYC
Scalable Web Architectures: Common Patterns and Approaches - Web 2.0 Expo NYC
 
Improving Drupal Performances
Improving Drupal PerformancesImproving Drupal Performances
Improving Drupal Performances
 
Scalable Web Architectures - Common Patterns & Approaches
Scalable Web Architectures - Common Patterns & ApproachesScalable Web Architectures - Common Patterns & Approaches
Scalable Web Architectures - Common Patterns & Approaches
 
Scalable Web Arch
Scalable Web ArchScalable Web Arch
Scalable Web Arch
 
Redis and Bloom Filters - Atlanta Java Users Group 9/2014
Redis and Bloom Filters - Atlanta Java Users Group 9/2014Redis and Bloom Filters - Atlanta Java Users Group 9/2014
Redis and Bloom Filters - Atlanta Java Users Group 9/2014
 

More from John Coggeshall

Virtualization for Developers
Virtualization for DevelopersVirtualization for Developers
Virtualization for Developers
John Coggeshall
 
Migrating to PHP 7
Migrating to PHP 7Migrating to PHP 7
Migrating to PHP 7
John Coggeshall
 
Peek at PHP 7
Peek at PHP 7Peek at PHP 7
Peek at PHP 7
John Coggeshall
 
ZF2 Modules: Events, Services, and of course, modularity
ZF2 Modules: Events, Services, and of course, modularityZF2 Modules: Events, Services, and of course, modularity
ZF2 Modules: Events, Services, and of course, modularity
John Coggeshall
 
Virtualization for Developers
Virtualization for DevelopersVirtualization for Developers
Virtualization for Developers
John Coggeshall
 
Development with Vagrant
Development with VagrantDevelopment with Vagrant
Development with Vagrant
John Coggeshall
 
Introduction to Zend Framework 2
Introduction to Zend Framework 2Introduction to Zend Framework 2
Introduction to Zend Framework 2
John Coggeshall
 
10 things not to do at a Startup
10 things not to do at a Startup10 things not to do at a Startup
10 things not to do at a Startup
John Coggeshall
 
Virtualization for Developers
Virtualization for DevelopersVirtualization for Developers
Virtualization for Developers
John Coggeshall
 
Puppet
PuppetPuppet
Building PHP Powered Android Applications
Building PHP Powered Android ApplicationsBuilding PHP Powered Android Applications
Building PHP Powered Android Applications
John Coggeshall
 
Ria Applications And PHP
Ria Applications And PHPRia Applications And PHP
Ria Applications And PHP
John Coggeshall
 
Beyond the Browser
Beyond the BrowserBeyond the Browser
Beyond the Browser
John Coggeshall
 
Ria Development With Flex And PHP
Ria Development With Flex And PHPRia Development With Flex And PHP
Ria Development With Flex And PHP
John Coggeshall
 
Enterprise PHP: A Case Study
Enterprise PHP: A Case StudyEnterprise PHP: A Case Study
Enterprise PHP: A Case Study
John Coggeshall
 
Building Dynamic Web Applications on i5 with PHP
Building Dynamic Web Applications on i5 with PHPBuilding Dynamic Web Applications on i5 with PHP
Building Dynamic Web Applications on i5 with PHP
John Coggeshall
 
PHP Security Basics
PHP Security BasicsPHP Security Basics
PHP Security Basics
John Coggeshall
 
Migrating from PHP 4 to PHP 5
Migrating from PHP 4 to PHP 5Migrating from PHP 4 to PHP 5
Migrating from PHP 4 to PHP 5
John Coggeshall
 
Ajax and PHP
Ajax and PHPAjax and PHP
Ajax and PHP
John Coggeshall
 
John's Top PECL Picks
John's Top PECL PicksJohn's Top PECL Picks
John's Top PECL Picks
John Coggeshall
 

More from John Coggeshall (20)

Virtualization for Developers
Virtualization for DevelopersVirtualization for Developers
Virtualization for Developers
 
Migrating to PHP 7
Migrating to PHP 7Migrating to PHP 7
Migrating to PHP 7
 
Peek at PHP 7
Peek at PHP 7Peek at PHP 7
Peek at PHP 7
 
ZF2 Modules: Events, Services, and of course, modularity
ZF2 Modules: Events, Services, and of course, modularityZF2 Modules: Events, Services, and of course, modularity
ZF2 Modules: Events, Services, and of course, modularity
 
Virtualization for Developers
Virtualization for DevelopersVirtualization for Developers
Virtualization for Developers
 
Development with Vagrant
Development with VagrantDevelopment with Vagrant
Development with Vagrant
 
Introduction to Zend Framework 2
Introduction to Zend Framework 2Introduction to Zend Framework 2
Introduction to Zend Framework 2
 
10 things not to do at a Startup
10 things not to do at a Startup10 things not to do at a Startup
10 things not to do at a Startup
 
Virtualization for Developers
Virtualization for DevelopersVirtualization for Developers
Virtualization for Developers
 
Puppet
PuppetPuppet
Puppet
 
Building PHP Powered Android Applications
Building PHP Powered Android ApplicationsBuilding PHP Powered Android Applications
Building PHP Powered Android Applications
 
Ria Applications And PHP
Ria Applications And PHPRia Applications And PHP
Ria Applications And PHP
 
Beyond the Browser
Beyond the BrowserBeyond the Browser
Beyond the Browser
 
Ria Development With Flex And PHP
Ria Development With Flex And PHPRia Development With Flex And PHP
Ria Development With Flex And PHP
 
Enterprise PHP: A Case Study
Enterprise PHP: A Case StudyEnterprise PHP: A Case Study
Enterprise PHP: A Case Study
 
Building Dynamic Web Applications on i5 with PHP
Building Dynamic Web Applications on i5 with PHPBuilding Dynamic Web Applications on i5 with PHP
Building Dynamic Web Applications on i5 with PHP
 
PHP Security Basics
PHP Security BasicsPHP Security Basics
PHP Security Basics
 
Migrating from PHP 4 to PHP 5
Migrating from PHP 4 to PHP 5Migrating from PHP 4 to PHP 5
Migrating from PHP 4 to PHP 5
 
Ajax and PHP
Ajax and PHPAjax and PHP
Ajax and PHP
 
John's Top PECL Picks
John's Top PECL PicksJohn's Top PECL Picks
John's Top PECL Picks
 

Recently uploaded

UiPath Community Day Kraków: Devs4Devs Conference
UiPath Community Day Kraków: Devs4Devs ConferenceUiPath Community Day Kraków: Devs4Devs Conference
UiPath Community Day Kraków: Devs4Devs Conference
UiPathCommunity
 
Cookies program to display the information though cookie creation
Cookies program to display the information though cookie creationCookies program to display the information though cookie creation
Cookies program to display the information though cookie creation
shanthidl1
 
Coordinate Systems in FME 101 - Webinar Slides
Coordinate Systems in FME 101 - Webinar SlidesCoordinate Systems in FME 101 - Webinar Slides
Coordinate Systems in FME 101 - Webinar Slides
Safe Software
 
20240705 QFM024 Irresponsible AI Reading List June 2024
20240705 QFM024 Irresponsible AI Reading List June 202420240705 QFM024 Irresponsible AI Reading List June 2024
20240705 QFM024 Irresponsible AI Reading List June 2024
Matthew Sinclair
 
Scaling Connections in PostgreSQL Postgres Bangalore(PGBLR) Meetup-2 - Mydbops
Scaling Connections in PostgreSQL Postgres Bangalore(PGBLR) Meetup-2 - MydbopsScaling Connections in PostgreSQL Postgres Bangalore(PGBLR) Meetup-2 - Mydbops
Scaling Connections in PostgreSQL Postgres Bangalore(PGBLR) Meetup-2 - Mydbops
Mydbops
 
Quality Patents: Patents That Stand the Test of Time
Quality Patents: Patents That Stand the Test of TimeQuality Patents: Patents That Stand the Test of Time
Quality Patents: Patents That Stand the Test of Time
Aurora Consulting
 
Understanding Insider Security Threats: Types, Examples, Effects, and Mitigat...
Understanding Insider Security Threats: Types, Examples, Effects, and Mitigat...Understanding Insider Security Threats: Types, Examples, Effects, and Mitigat...
Understanding Insider Security Threats: Types, Examples, Effects, and Mitigat...
Bert Blevins
 
Research Directions for Cross Reality Interfaces
Research Directions for Cross Reality InterfacesResearch Directions for Cross Reality Interfaces
Research Directions for Cross Reality Interfaces
Mark Billinghurst
 
Quantum Communications Q&A with Gemini LLM
Quantum Communications Q&A with Gemini LLMQuantum Communications Q&A with Gemini LLM
Quantum Communications Q&A with Gemini LLM
Vijayananda Mohire
 
[Talk] Moving Beyond Spaghetti Infrastructure [AOTB] 2024-07-04.pdf
[Talk] Moving Beyond Spaghetti Infrastructure [AOTB] 2024-07-04.pdf[Talk] Moving Beyond Spaghetti Infrastructure [AOTB] 2024-07-04.pdf
[Talk] Moving Beyond Spaghetti Infrastructure [AOTB] 2024-07-04.pdf
Kief Morris
 
20240702 Présentation Plateforme GenAI.pdf
20240702 Présentation Plateforme GenAI.pdf20240702 Présentation Plateforme GenAI.pdf
20240702 Présentation Plateforme GenAI.pdf
Sally Laouacheria
 
RPA In Healthcare Benefits, Use Case, Trend And Challenges 2024.pptx
RPA In Healthcare Benefits, Use Case, Trend And Challenges 2024.pptxRPA In Healthcare Benefits, Use Case, Trend And Challenges 2024.pptx
RPA In Healthcare Benefits, Use Case, Trend And Challenges 2024.pptx
SynapseIndia
 
How RPA Help in the Transportation and Logistics Industry.pptx
How RPA Help in the Transportation and Logistics Industry.pptxHow RPA Help in the Transportation and Logistics Industry.pptx
How RPA Help in the Transportation and Logistics Industry.pptx
SynapseIndia
 
論文紹介:A Systematic Survey of Prompt Engineering on Vision-Language Foundation ...
論文紹介:A Systematic Survey of Prompt Engineering on Vision-Language Foundation ...論文紹介:A Systematic Survey of Prompt Engineering on Vision-Language Foundation ...
論文紹介:A Systematic Survey of Prompt Engineering on Vision-Language Foundation ...
Toru Tamaki
 
20240704 QFM023 Engineering Leadership Reading List June 2024
20240704 QFM023 Engineering Leadership Reading List June 202420240704 QFM023 Engineering Leadership Reading List June 2024
20240704 QFM023 Engineering Leadership Reading List June 2024
Matthew Sinclair
 
DealBook of Ukraine: 2024 edition
DealBook of Ukraine: 2024 editionDealBook of Ukraine: 2024 edition
DealBook of Ukraine: 2024 edition
Yevgen Sysoyev
 
How to Build a Profitable IoT Product.pptx
How to Build a Profitable IoT Product.pptxHow to Build a Profitable IoT Product.pptx
How to Build a Profitable IoT Product.pptx
Adam Dunkels
 
How Social Media Hackers Help You to See Your Wife's Message.pdf
How Social Media Hackers Help You to See Your Wife's Message.pdfHow Social Media Hackers Help You to See Your Wife's Message.pdf
How Social Media Hackers Help You to See Your Wife's Message.pdf
HackersList
 
Best Programming Language for Civil Engineers
Best Programming Language for Civil EngineersBest Programming Language for Civil Engineers
Best Programming Language for Civil Engineers
Awais Yaseen
 
What's New in Copilot for Microsoft365 May 2024.pptx
What's New in Copilot for Microsoft365 May 2024.pptxWhat's New in Copilot for Microsoft365 May 2024.pptx
What's New in Copilot for Microsoft365 May 2024.pptx
Stephanie Beckett
 

Recently uploaded (20)

UiPath Community Day Kraków: Devs4Devs Conference
UiPath Community Day Kraków: Devs4Devs ConferenceUiPath Community Day Kraków: Devs4Devs Conference
UiPath Community Day Kraków: Devs4Devs Conference
 
Cookies program to display the information though cookie creation
Cookies program to display the information though cookie creationCookies program to display the information though cookie creation
Cookies program to display the information though cookie creation
 
Coordinate Systems in FME 101 - Webinar Slides
Coordinate Systems in FME 101 - Webinar SlidesCoordinate Systems in FME 101 - Webinar Slides
Coordinate Systems in FME 101 - Webinar Slides
 
20240705 QFM024 Irresponsible AI Reading List June 2024
20240705 QFM024 Irresponsible AI Reading List June 202420240705 QFM024 Irresponsible AI Reading List June 2024
20240705 QFM024 Irresponsible AI Reading List June 2024
 
Scaling Connections in PostgreSQL Postgres Bangalore(PGBLR) Meetup-2 - Mydbops
Scaling Connections in PostgreSQL Postgres Bangalore(PGBLR) Meetup-2 - MydbopsScaling Connections in PostgreSQL Postgres Bangalore(PGBLR) Meetup-2 - Mydbops
Scaling Connections in PostgreSQL Postgres Bangalore(PGBLR) Meetup-2 - Mydbops
 
Quality Patents: Patents That Stand the Test of Time
Quality Patents: Patents That Stand the Test of TimeQuality Patents: Patents That Stand the Test of Time
Quality Patents: Patents That Stand the Test of Time
 
Understanding Insider Security Threats: Types, Examples, Effects, and Mitigat...
Understanding Insider Security Threats: Types, Examples, Effects, and Mitigat...Understanding Insider Security Threats: Types, Examples, Effects, and Mitigat...
Understanding Insider Security Threats: Types, Examples, Effects, and Mitigat...
 
Research Directions for Cross Reality Interfaces
Research Directions for Cross Reality InterfacesResearch Directions for Cross Reality Interfaces
Research Directions for Cross Reality Interfaces
 
Quantum Communications Q&A with Gemini LLM
Quantum Communications Q&A with Gemini LLMQuantum Communications Q&A with Gemini LLM
Quantum Communications Q&A with Gemini LLM
 
[Talk] Moving Beyond Spaghetti Infrastructure [AOTB] 2024-07-04.pdf
[Talk] Moving Beyond Spaghetti Infrastructure [AOTB] 2024-07-04.pdf[Talk] Moving Beyond Spaghetti Infrastructure [AOTB] 2024-07-04.pdf
[Talk] Moving Beyond Spaghetti Infrastructure [AOTB] 2024-07-04.pdf
 
20240702 Présentation Plateforme GenAI.pdf
20240702 Présentation Plateforme GenAI.pdf20240702 Présentation Plateforme GenAI.pdf
20240702 Présentation Plateforme GenAI.pdf
 
RPA In Healthcare Benefits, Use Case, Trend And Challenges 2024.pptx
RPA In Healthcare Benefits, Use Case, Trend And Challenges 2024.pptxRPA In Healthcare Benefits, Use Case, Trend And Challenges 2024.pptx
RPA In Healthcare Benefits, Use Case, Trend And Challenges 2024.pptx
 
How RPA Help in the Transportation and Logistics Industry.pptx
How RPA Help in the Transportation and Logistics Industry.pptxHow RPA Help in the Transportation and Logistics Industry.pptx
How RPA Help in the Transportation and Logistics Industry.pptx
 
論文紹介:A Systematic Survey of Prompt Engineering on Vision-Language Foundation ...
論文紹介:A Systematic Survey of Prompt Engineering on Vision-Language Foundation ...論文紹介:A Systematic Survey of Prompt Engineering on Vision-Language Foundation ...
論文紹介:A Systematic Survey of Prompt Engineering on Vision-Language Foundation ...
 
20240704 QFM023 Engineering Leadership Reading List June 2024
20240704 QFM023 Engineering Leadership Reading List June 202420240704 QFM023 Engineering Leadership Reading List June 2024
20240704 QFM023 Engineering Leadership Reading List June 2024
 
DealBook of Ukraine: 2024 edition
DealBook of Ukraine: 2024 editionDealBook of Ukraine: 2024 edition
DealBook of Ukraine: 2024 edition
 
How to Build a Profitable IoT Product.pptx
How to Build a Profitable IoT Product.pptxHow to Build a Profitable IoT Product.pptx
How to Build a Profitable IoT Product.pptx
 
How Social Media Hackers Help You to See Your Wife's Message.pdf
How Social Media Hackers Help You to See Your Wife's Message.pdfHow Social Media Hackers Help You to See Your Wife's Message.pdf
How Social Media Hackers Help You to See Your Wife's Message.pdf
 
Best Programming Language for Civil Engineers
Best Programming Language for Civil EngineersBest Programming Language for Civil Engineers
Best Programming Language for Civil Engineers
 
What's New in Copilot for Microsoft365 May 2024.pptx
What's New in Copilot for Microsoft365 May 2024.pptxWhat's New in Copilot for Microsoft365 May 2024.pptx
What's New in Copilot for Microsoft365 May 2024.pptx
 

Apache Con 2008 Top 10 Mistakes

  • 1. Top 10 Scalability Mistakes John Coggeshall
  • 2. Welcome! Who am I: John Coggeshall Chief Technology Officer, Automotive Computer Services Author PHP 5 Unleashed Speaker on PHP-related topics worldwide Geek
  • 3. What is Scalability? Define: Scalability The ability and flexibility of an application to meet growth requirements of an organization More then making a site go fast(er) Scalability in human resources, for example The “fastest” approach isn’t always the most scalable OO is slower, but more scalable from a code maintenance and reuse standpoint Failure to consider future needs during architectural stages leading to failure of the application’s API to scale
  • 4. # The secret to scalability is the ability to design, code, and maintain your applications using the same process again and again regardless of size
  • 5. … .From Traffic To Infrastructure…
  • 6. “ Scalability marginally impacts procedure, procedure grossly impacts scalability” - Theo Schlossnagle
  • 7. You have to plan Performance and resource scalability requires forethought and process Version Control Performance Goals Metric measuring Development Mailing Lists API documentation Awareness is key Think about these problems and how you will solve them as your project gets off the ground
  • 8. Designing without Scalability If your application does not perform it will likely not succeed What does it mean to perform? 10 requests/sec? 100 requests/sec? 1000 requests/sec? If you don’t know what it will take to meet your performance requirements, you probably won’t meet them. At its worst, you'll be faced with a memorable and sometimes job-ending quote: 'This will never work. You're going to have to start all over.’
  • 9. Performance Metrics Response Time How long does it take for the server to respond to the request? Resource usage CPU, memory, disk I/O, Network I/O Throughput Requests / second Probably the most useful number to keep track of
  • 10. Proactive vs. Reactive Common Scenario: Reactive Write your app Deploy it Watch it blow up Try to fix it If you’re lucky, you might succeed “enough” If you’re unlucky….. Correct Approach: Proactive Know your performance goals up front and make sure your application is living up to them as part of the development process
  • 11. Everyone has a role in Performance Architects: Balance performance against other application needs Interoperability Security Maintainability Developers: You need to know how to measure and how to optimize to meet the goals Web-stress tools, profilers, etc.
  • 12. Designing with Scalability When designing your application, you should assume it needs to scale Quick and dirty prototypes often are exactly what gets to production It’s easy to make sure your applications have a decent chance of scaling MySQL: Design assuming someday you’ll need master/server replication, for example
  • 13. Designing with Scalability Don’t write an application you’ll need three years from now, write an application you need today Just think about what you might need in three years
  • 14. Common Performance Blunders The names have been changed to protected the innocent, as well as my wallet.
  • 15. Network file systems Problem: We have a server farm of 10 servers and we need to deploy our code base Very common problem Many people look to a technology like NFS At least 90% of the time, this is a bad idea NFS/GFS is really slow NFS/GFS has tons of locking issues
  • 16. Network file systems So how do we deploy our code base? You should always deploy your code base locally on the machine serving it Rsync is your friend What about run-time updates? Accepting File uploads Need to be available to all servers simultaneously Solutions vary depending on needs NFS may be an option for this small portion of the site Database is also an option
  • 17. I/O Buffers I/O Buffers are there for a reason, to make things faster Sending 4098 bytes of data to the user when your system write blocks are 4096 bytes is stupid In PHP you can solve this using output buffering At the system level you can also boost up your TCP buffer size Almost always a good idea, most distributions are very conservative here Just be mindful of the amount of RAM you actually have
  • 18. Ram Disks Ram Disks are a very nice way to improve performance of an application, as long as you have a lot of memory laying around Use Ramdisks to store any sort of data you wouldn’t care if you lost when the 16 year old trips over the power cable A reasonable alternative to shared memory
  • 19. Bandwidth Optimization You can optimize bandwidth in a few ways Compression mod_deflate Zlib.output_compression=1 (PHP) Content Reduction via Tidy: <?php $o = array(&quot;clean&quot; => true, &quot;drop-proprietary-attributes&quot; => true, &quot;drop-font-tags&quot; => true, &quot;drop-empty-paras&quot; => true, &quot;hide-comments&quot; => true, &quot;join-classes&quot; => true, &quot;join-styles&quot; => true); $tidy = tidy_parse_file(&quot;php.html&quot;, $o); tidy_clean_repair($tidy); echo $tidy; ?>
  • 20. Configuring PHP for Speed register_globals = off auto_globals_jit = on magic_quotes_gpc = off expose_php = off register_argc_argv = off always_populate_raw_post_data = off session.use_trans_sid = off session.auto_start = off session.gc_divisor = 10000 output_buffering = 4096
  • 21. Blocking calls Blocking I/O can always be a problem in an application I.e. attempting to open a remote URL from within your PHP scripts If the resource is locked / slow / unavailable your script hangs while we wait for a timeout Might as well try to scale an application that has a sleep(30) in it Very bad
  • 22. Blocking calls Solutions Don’t use blocking calls in your application Don’t use blocking calls in the heavy-load aspects of your application Have out-of-process scripts responsible for pulling down data
  • 23. Failing to Cache Caching is one of the most important things you can do when writing a scalable application A lot of people don’t realize how much they can cache Rarely is a 5 second cache of any data going to affect user experience Yet it will have significant performance impact 1 page load / 2 queries per request 2 queries * 200 request / sec = 400 queries / second 400 queries * 5 seconds = 2000 queries you didn’t do
  • 24. Failing to Cache Improving the speed of PHP can be done very easily using an op-code cache PHP 6 will have this ability built-in to the engine
  • 25. Semi-Static Caching If you're web application has a lot of semi-static content Content that could change so it has to be stored in the DB, but almost never does .. And you're running on Apache This Design Pattern is killer!
  • 26. Semi-Static Caching Most people in PHP would implement a page like this: http://www.example.com/show_article.php?id=5 This would be responsible for generating the semi-static page HTML for the browser
  • 27. Semi-Static Caching Instead of generating the HTML for the browser, make this script generate another PHP script that contains mostly static content Keep things like personalization code, but make the actual article itself static in the file Write the file to disk in a public folder under document root
  • 28. Semi-Static Caching If you put them in this directory http://www.example.com/articles/5.php You can create a mod_rewrite rule such that http://www.example.com/articles/5.php maps to http://www.example.com/show_article.php?id=5 Since show_article.php writes articles to files, once it's been generated no more DB reads!
  • 29. Semi-Static Caching Simple and Elegant Solution Allows you to keep pages “personalized” Very easy to Maintain #
  • 30. Poor database design Database design is almost always the most important thing in your application PHP can be used completely properly, but if you mess up the database you’re hosed anyway Take the time to really think about your design Read books on designing relational databases Understand how Indexes work, and use them How Much Data?
  • 31. Poor database design For example.. Using MySQL MyISAM tables all the time Use InnoDB instead if you can Use MyISAM tables only if you plan on doing fulltext searching Even then, they shouldn’t be primary tables
  • 32. Improperly dealing with database connections Improperly using persistent database connections Know your database, MySQL has a relatively light handshake process compared to Oracle Using PHP to deal with database fail over It’s not PHP’s Job, don’t do it.
  • 33. Let me say that again.. I DO NOT CARE WHAT IT SAYS IN SOME BOOK, DO NOT USE PHP TO DETERMINE WHICH DATABASE TO CONNECT TO
  • 34. Database connections Bad: Code to determine if it is the dev environment or not and a different database is selected in each case Suicidal: Code to determine if the primary master in a MySQL database is down, and instead attempt to seamlessly roll-over to a hot swap MySQL slave you bless as master GOOD: MySQL Proxy
  • 35. Having your Cake and Eating it too For those of us using MySQL, here’s a great replication trick from our friends at Flickr InnoDB is under most circumstances considerably faster then MyISAM MyISAM is considerably better suited for full-text searches Trick: During a master/slave replication, the slave table type can change Set up a separate MyISAM fulltext search farm Connect to those servers when performing full-text searches
  • 36.  
  • 37. SQLite, Huh? SQLite is a great database package for PHP that can really speed certain things up Requires you understanding when and how to use it. SQLite is basically a flat-file embedded database Crazy-fast reads, horrible writes (full database locks) Answer: SQLite is a great lookup database
  • 38. Keepalive Requests Keepalive sounds great on paper It can actually totally hose you if you aren’t careful Use Keepalive if: You use the same server for static/dynamic content You intelligently know how to set the timeout No Keepalive request should last more then 10 seconds If Apache is 100% Dynamic Turn it off
  • 39. Knowing where to Not optimize Sooner or later, you (likely) will worry about optimization Hopefully, you didn’t start after your application started blowing up (aka Twitter) When trying to make scalability decisions knowledge is the most important thing you can have
  • 40. Knowing where to Not optimize PHP has both closed source and open source profilers which do an excellent job of identifying the bottlenecks in your application vmstat, iostat are your friends Optimize where it counts
  • 41. Instrumentation of your applications is key to determining what matters most when optimizing If you’re not logging, you’re shooting in the dark White-box monitoring of your applications via tools like Zend Platform are enormously helpful in understanding what is going on You can’t make good process (or business) decisions unless you understand how your web site is being used and by whom . Knowing where to Not optimize
  • 42. Amdahl’s Law: Improving code execution time by 50% when the code executes only 2% of the time will result in a 1% overall improvement Improving code execution time by 10% when the code executes 80% of the time will result in a 8% overall improvement Knowing where to Not optimize
  • 43. Use Profilers Profilers are easy to use Profilers draw pretty pictures Profilers are good Use profilers
  • 44. How a Profiler/Debugger works in PHP Profiler / Debuggers in PHP work remotely against the web server
  • 45. Tips on using a profiler When doing real performance analysis, here are a few tips to help you out: Copy the raw data (function execution times) into a spreadsheet and do analysis from there Most profilers provide at least two execution figures per function call The amount of time spent executing PHP code The amount of time PHP spent internally That means total = A + B If you are spending a lot more time inside of PHP, you’ve got a blocking issue somewhere
  • 46. Something More.. Do not mistake something more for something better Dev: “Hey, let’s build this great ORM that automatically generates it’s views like Ruby!” Manager: “Sounds great, go to it” <4 months pass> Dev: “Here’s my two weeks notice, I quit” Manager: “Okay John you write it” John: “Um, I have no idea what this guy did” <2 months pass to re-write the module in a way that we can maintain it>
  • 47. Something More.. Don’t use a sledge hammer when a tack hammer will do Devs: Just because your boss doesn’t know the difference doesn’t make it a good idea It might seem like great job security to write code only you can maintain, but in reality all it will do is get you fired faster when they figure it out Managers: Know enough about the technologies to keep eager developers from leaving you holding the bag.
  • 48. Final Thoughts # Ultimately the secret of scalability is developing applications and procedures which scale both UP AND DOWN You have to be able to afford to make the application to begin with You have to be able to afford to make the application ten times bigger then it is Without process, you will fail. REMEMBER: In ANY application, there is only ever one bottleneck Questions?