This document introduces a high performance photo gallery and summarizes recent updates and improvements. It discusses:
1. New features like mobile support, shopping functionality, and performance optimizations.
2. Architecture decisions like caching, SQL optimization, and use of Sphinx, Memcached, and Nginx.
3. Benchmark results showing the system can handle over 180,000 pageviews daily on a single server.
The SPDY Protocol is likely going to be the successor of http. This short talk summarizes the most important points and includes a demo on how to migrate a Wordpress blog on httpd.
The SPDY Protocol is likely going to be the successor of http. This short talk summarizes the most important points and includes a demo on how to migrate a Wordpress blog on httpd.
Caching and tuning fun for high scalability @ phpBenelux 2011Wim Godden
Slides for "Caching and Tuning fun for high scalability" talk, given @ phpBenelux Conference - Jan 28, 2011
Note that a lot of things were explained with each slide... that content is ofcourse not in the slides, so it might make some slides very unclear.
Caching and tuning fun for high scalability @ FOSDEM 2012Wim Godden
Caching has been a 'hot' topic for a few years. But caching takes more than merely taking data and putting it in a cache : the right caching techniques can improve performance and reduce load significantly. But we'll also look at some major pitfalls, showing that caching the wrong way can bring down your site. If you're looking for a clear explanation about various caching techniques and tools like Memcached, Nginx and Varnish, as well as ways to deploy them in an efficient way, this talk is for you.
80% of the time it takes for a web page to load is on the client side.
Using all the tips in this presentation should cut 25% to 50% off the load time of optimized page requests.
Drupal (6 or 7) can be used to, fairly easily, implement a whole bunch of these “front-end performance” upgrades, and knock a ton of errors off of the Yahoo! and Google speed-checker tools validation checklists.Get firebug first.
A look at how HTML5 aims to plug the holes that Flash has been filling in browsers for the last decade, looking at both HTML5 and non-HTML5 JavaScript APIs.
For Flash Brighton in Feb 2010.
In this session we will present an overview from the point of view 'system that implementative on how to get the best performance from your drupal application.
We will also show examples of use cases for drupal scalable infrastructure.
Multi-Tenancy is a critical component of any Software as a Service (SaaS) application, which enables one application instance to serve multiple organizations, or tenants. This presentation by Scott Crespo covers the basics of multi-tenant architectures, and how to implement multi-tenancy using Python, Django, and the open-source project known as Django Tenant Schemas.
Given at zendcon 2007 unconference. My first "talk" ever given. Had a live demo. Note that although some of the information here is still pertinent, a lot is now outdated and most of the links no longer work. This is here for archival reasons
Caching and tuning fun for high scalability @ phpBenelux 2011Wim Godden
Slides for "Caching and Tuning fun for high scalability" talk, given @ phpBenelux Conference - Jan 28, 2011
Note that a lot of things were explained with each slide... that content is ofcourse not in the slides, so it might make some slides very unclear.
Caching and tuning fun for high scalability @ FOSDEM 2012Wim Godden
Caching has been a 'hot' topic for a few years. But caching takes more than merely taking data and putting it in a cache : the right caching techniques can improve performance and reduce load significantly. But we'll also look at some major pitfalls, showing that caching the wrong way can bring down your site. If you're looking for a clear explanation about various caching techniques and tools like Memcached, Nginx and Varnish, as well as ways to deploy them in an efficient way, this talk is for you.
80% of the time it takes for a web page to load is on the client side.
Using all the tips in this presentation should cut 25% to 50% off the load time of optimized page requests.
Drupal (6 or 7) can be used to, fairly easily, implement a whole bunch of these “front-end performance” upgrades, and knock a ton of errors off of the Yahoo! and Google speed-checker tools validation checklists.Get firebug first.
A look at how HTML5 aims to plug the holes that Flash has been filling in browsers for the last decade, looking at both HTML5 and non-HTML5 JavaScript APIs.
For Flash Brighton in Feb 2010.
In this session we will present an overview from the point of view 'system that implementative on how to get the best performance from your drupal application.
We will also show examples of use cases for drupal scalable infrastructure.
Multi-Tenancy is a critical component of any Software as a Service (SaaS) application, which enables one application instance to serve multiple organizations, or tenants. This presentation by Scott Crespo covers the basics of multi-tenant architectures, and how to implement multi-tenancy using Python, Django, and the open-source project known as Django Tenant Schemas.
Given at zendcon 2007 unconference. My first "talk" ever given. Had a live demo. Note that although some of the information here is still pertinent, a lot is now outdated and most of the links no longer work. This is here for archival reasons
PHP At 5000 Requests Per Second: Hootsuite’s Scaling Storyvanphp
Bill Monkman, Lead Engineer at Hootsuite, presenting on how Hootsuite went from zero to hundreds of millions of requests per day with its PHP codebase, and how dealing with that growth has shaped its future direction. Tips, optimizations, and horror stories from a rapidly-scaling PHP startup.
Video: https://www.youtube.com/watch?v=TZGeBAIMPII
Slides from my speech about web apps performance. Images, CSS, JS optimization. PHP and HTTP server effects + caching. Performance profiling with Blackfire.io, debugging with Xdebug.
PyGrunn2013 High Performance Web Applications with TurboGearsAlessandro Molina
Users are getting more and more used to fast websites, a second or two is way too much before they leave the page. Since version 2.2 TurboGears has focused on providing more tools to create faster web applications and improving its speed constantly. The latest 2.3 version, the first to support Python3 is up to 4x faster than the previous and provides a great toolset to make fast pages. The talk will focus on showcasing the tools provided by the framework to increase speed of your web applications and provide some tips and tricks to get maximum speed from the framework itself.
Lets look at an example of what a performant website can look like. This discuss what concepts should we be considering when looking at website performance. Next we will go over two areas pertaining to website performance: 1) website performance tweaks that you as a web developer can directly make 2) website performance tweaks that you may have to work with your hosting provider or IT department to achieve
AD113 Speed Up Your Applications w/ Nginx and PageSpeededm00se
My slide deck from my session, AD113: Speed Up Your Applications with Nginx + PageSpeed, at MWLUG 2015 in Atlanta, GA at the Ritz-Carlton.
For more, see:
- https://edm00se.io/self-promotion/mwlug-ad113-success
- https://github.com/edm00se/AD113-Speed-Up-Your-Apps-with-Nginx-and-PageSpeed
5 things you didn't know nginx could dosarahnovotny
NGINX is a well kept secret of high performance web service. Many people know NGINX as an Open Source web server that delivers static content blazingly fast. But, it has many more features to help accelerate delivery of bits to your end users even in more complicated application environments. In this talk we'll cover several things that most developers or administrators could implement to further delight their end users.
Talk given at the Erlang User Conference, june 2013, Stockholm, about the performance of Zotonic, the Erlang Web Framework and CMS.
It highlights Zotonic's architecture, performance charts and provides a glimpse into the future of this web development framework.
Similar to HPPG - high performance photo gallery (20)
Climate Impact of Software Testing at Nordic Testing DaysKari Kakkonen
My slides at Nordic Testing Days 6.6.2024
Climate impact / sustainability of software testing discussed on the talk. ICT and testing must carry their part of global responsibility to help with the climat warming. We can minimize the carbon footprint but we can also have a carbon handprint, a positive impact on the climate. Quality characteristics can be added with sustainability, and then measured continuously. Test environments can be used less, and in smaller scale and on demand. Test techniques can be used in optimizing or minimizing number of tests. Test automation can be used to speed up testing.
In the rapidly evolving landscape of technologies, XML continues to play a vital role in structuring, storing, and transporting data across diverse systems. The recent advancements in artificial intelligence (AI) present new methodologies for enhancing XML development workflows, introducing efficiency, automation, and intelligent capabilities. This presentation will outline the scope and perspective of utilizing AI in XML development. The potential benefits and the possible pitfalls will be highlighted, providing a balanced view of the subject.
We will explore the capabilities of AI in understanding XML markup languages and autonomously creating structured XML content. Additionally, we will examine the capacity of AI to enrich plain text with appropriate XML markup. Practical examples and methodological guidelines will be provided to elucidate how AI can be effectively prompted to interpret and generate accurate XML markup.
Further emphasis will be placed on the role of AI in developing XSLT, or schemas such as XSD and Schematron. We will address the techniques and strategies adopted to create prompts for generating code, explaining code, or refactoring the code, and the results achieved.
The discussion will extend to how AI can be used to transform XML content. In particular, the focus will be on the use of AI XPath extension functions in XSLT, Schematron, Schematron Quick Fixes, or for XML content refactoring.
The presentation aims to deliver a comprehensive overview of AI usage in XML development, providing attendees with the necessary knowledge to make informed decisions. Whether you’re at the early stages of adopting AI or considering integrating it in advanced XML development, this presentation will cover all levels of expertise.
By highlighting the potential advantages and challenges of integrating AI with XML development tools and languages, the presentation seeks to inspire thoughtful conversation around the future of XML development. We’ll not only delve into the technical aspects of AI-powered XML development but also discuss practical implications and possible future directions.
In his public lecture, Christian Timmerer provides insights into the fascinating history of video streaming, starting from its humble beginnings before YouTube to the groundbreaking technologies that now dominate platforms like Netflix and ORF ON. Timmerer also presents provocative contributions of his own that have significantly influenced the industry. He concludes by looking at future challenges and invites the audience to join in a discussion.
Pushing the limits of ePRTC: 100ns holdover for 100 daysAdtran
At WSTS 2024, Alon Stern explored the topic of parametric holdover and explained how recent research findings can be implemented in real-world PNT networks to achieve 100 nanoseconds of accuracy for up to 100 days.
Enchancing adoption of Open Source Libraries. A case study on Albumentations.AIVladimir Iglovikov, Ph.D.
Presented by Vladimir Iglovikov:
- https://www.linkedin.com/in/iglovikov/
- https://x.com/viglovikov
- https://www.instagram.com/ternaus/
This presentation delves into the journey of Albumentations.ai, a highly successful open-source library for data augmentation.
Created out of a necessity for superior performance in Kaggle competitions, Albumentations has grown to become a widely used tool among data scientists and machine learning practitioners.
This case study covers various aspects, including:
People: The contributors and community that have supported Albumentations.
Metrics: The success indicators such as downloads, daily active users, GitHub stars, and financial contributions.
Challenges: The hurdles in monetizing open-source projects and measuring user engagement.
Development Practices: Best practices for creating, maintaining, and scaling open-source libraries, including code hygiene, CI/CD, and fast iteration.
Community Building: Strategies for making adoption easy, iterating quickly, and fostering a vibrant, engaged community.
Marketing: Both online and offline marketing tactics, focusing on real, impactful interactions and collaborations.
Mental Health: Maintaining balance and not feeling pressured by user demands.
Key insights include the importance of automation, making the adoption process seamless, and leveraging offline interactions for marketing. The presentation also emphasizes the need for continuous small improvements and building a friendly, inclusive community that contributes to the project's growth.
Vladimir Iglovikov brings his extensive experience as a Kaggle Grandmaster, ex-Staff ML Engineer at Lyft, sharing valuable lessons and practical advice for anyone looking to enhance the adoption of their open-source projects.
Explore more about Albumentations and join the community at:
GitHub: https://github.com/albumentations-team/albumentations
Website: https://albumentations.ai/
LinkedIn: https://www.linkedin.com/company/100504475
Twitter: https://x.com/albumentations
zkStudyClub - Reef: Fast Succinct Non-Interactive Zero-Knowledge Regex ProofsAlex Pruden
This paper presents Reef, a system for generating publicly verifiable succinct non-interactive zero-knowledge proofs that a committed document matches or does not match a regular expression. We describe applications such as proving the strength of passwords, the provenance of email despite redactions, the validity of oblivious DNS queries, and the existence of mutations in DNA. Reef supports the Perl Compatible Regular Expression syntax, including wildcards, alternation, ranges, capture groups, Kleene star, negations, and lookarounds. Reef introduces a new type of automata, Skipping Alternating Finite Automata (SAFA), that skips irrelevant parts of a document when producing proofs without undermining soundness, and instantiates SAFA with a lookup argument. Our experimental evaluation confirms that Reef can generate proofs for documents with 32M characters; the proofs are small and cheap to verify (under a second).
Paper: https://eprint.iacr.org/2023/1886
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...James Anderson
Effective Application Security in Software Delivery lifecycle using Deployment Firewall and DBOM
The modern software delivery process (or the CI/CD process) includes many tools, distributed teams, open-source code, and cloud platforms. Constant focus on speed to release software to market, along with the traditional slow and manual security checks has caused gaps in continuous security as an important piece in the software supply chain. Today organizations feel more susceptible to external and internal cyber threats due to the vast attack surface in their applications supply chain and the lack of end-to-end governance and risk management.
The software team must secure its software delivery process to avoid vulnerability and security breaches. This needs to be achieved with existing tool chains and without extensive rework of the delivery processes. This talk will present strategies and techniques for providing visibility into the true risk of the existing vulnerabilities, preventing the introduction of security issues in the software, resolving vulnerabilities in production environments quickly, and capturing the deployment bill of materials (DBOM).
Speakers:
Bob Boule
Robert Boule is a technology enthusiast with PASSION for technology and making things work along with a knack for helping others understand how things work. He comes with around 20 years of solution engineering experience in application security, software continuous delivery, and SaaS platforms. He is known for his dynamic presentations in CI/CD and application security integrated in software delivery lifecycle.
Gopinath Rebala
Gopinath Rebala is the CTO of OpsMx, where he has overall responsibility for the machine learning and data processing architectures for Secure Software Delivery. Gopi also has a strong connection with our customers, leading design and architecture for strategic implementations. Gopi is a frequent speaker and well-known leader in continuous delivery and integrating security into software delivery.
A tale of scale & speed: How the US Navy is enabling software delivery from l...sonjaschweigert1
Rapid and secure feature delivery is a goal across every application team and every branch of the DoD. The Navy’s DevSecOps platform, Party Barge, has achieved:
- Reduction in onboarding time from 5 weeks to 1 day
- Improved developer experience and productivity through actionable findings and reduction of false positives
- Maintenance of superior security standards and inherent policy enforcement with Authorization to Operate (ATO)
Development teams can ship efficiently and ensure applications are cyber ready for Navy Authorizing Officials (AOs). In this webinar, Sigma Defense and Anchore will give attendees a look behind the scenes and demo secure pipeline automation and security artifacts that speed up application ATO and time to production.
We will cover:
- How to remove silos in DevSecOps
- How to build efficient development pipeline roles and component templates
- How to deliver security artifacts that matter for ATO’s (SBOMs, vulnerability reports, and policy evidence)
- How to streamline operations with automated policy checks on container images
DevOps and Testing slides at DASA ConnectKari Kakkonen
My and Rik Marselis slides at 30.5.2024 DASA Connect conference. We discuss about what is testing, then what is agile testing and finally what is Testing in DevOps. Finally we had lovely workshop with the participants trying to find out different ways to think about quality and testing in different parts of the DevOps infinity loop.
GraphRAG is All You need? LLM & Knowledge GraphGuy Korland
Guy Korland, CEO and Co-founder of FalkorDB, will review two articles on the integration of language models with knowledge graphs.
1. Unifying Large Language Models and Knowledge Graphs: A Roadmap.
https://arxiv.org/abs/2306.08302
2. Microsoft Research's GraphRAG paper and a review paper on various uses of knowledge graphs:
https://www.microsoft.com/en-us/research/blog/graphrag-unlocking-llm-discovery-on-narrative-private-data/
GridMate - End to end testing is a critical piece to ensure quality and avoid...ThomasParaiso2
End to end testing is a critical piece to ensure quality and avoid regressions. In this session, we share our journey building an E2E testing pipeline for GridMate components (LWC and Aura) using Cypress, JSForce, FakerJS…
UiPath Test Automation using UiPath Test Suite series, part 6DianaGray10
Welcome to UiPath Test Automation using UiPath Test Suite series part 6. In this session, we will cover Test Automation with generative AI and Open AI.
UiPath Test Automation with generative AI and Open AI webinar offers an in-depth exploration of leveraging cutting-edge technologies for test automation within the UiPath platform. Attendees will delve into the integration of generative AI, a test automation solution, with Open AI advanced natural language processing capabilities.
Throughout the session, participants will discover how this synergy empowers testers to automate repetitive tasks, enhance testing accuracy, and expedite the software testing life cycle. Topics covered include the seamless integration process, practical use cases, and the benefits of harnessing AI-driven automation for UiPath testing initiatives. By attending this webinar, testers, and automation professionals can gain valuable insights into harnessing the power of AI to optimize their test automation workflows within the UiPath ecosystem, ultimately driving efficiency and quality in software development processes.
What will you get from this session?
1. Insights into integrating generative AI.
2. Understanding how this integration enhances test automation within the UiPath platform
3. Practical demonstrations
4. Exploration of real-world use cases illustrating the benefits of AI-driven test automation for UiPath
Topics covered:
What is generative AI
Test Automation with generative AI and Open AI.
UiPath integration with generative AI
Speaker:
Deepak Rai, Automation Practice Lead, Boundaryless Group and UiPath MVP
Securing your Kubernetes cluster_ a step-by-step guide to success !KatiaHIMEUR1
Today, after several years of existence, an extremely active community and an ultra-dynamic ecosystem, Kubernetes has established itself as the de facto standard in container orchestration. Thanks to a wide range of managed services, it has never been so easy to set up a ready-to-use Kubernetes cluster.
However, this ease of use means that the subject of security in Kubernetes is often left for later, or even neglected. This exposes companies to significant risks.
In this talk, I'll show you step-by-step how to secure your Kubernetes cluster for greater peace of mind and reliability.
2. Who I am?
● Author of
– http://livehelperchat.com/
– http://redmine.remdex.info my projects :)
● Currently working
http://www.coralsolutions.com/
– Freelancing and building open-source
software in free time
3. Purpose of the presentation 1
● Present some architecture decisions witch
were applied building image gallery
4. What's new since last presentation
● Mobile devices get support
● Image gallery can be used as shopping CMS
– Credit's based buying
– Checkout using paypal service
● Uncached pages get speed improvement by
finding bug in paginator.
● Official ngnix support
5. What's new since last presentation 2
● Extensions
● Kernel modules override
● Kernel classes override
● CSS compile
● Most popular images in 24 hours
● Photo approvement functionality
● Image filtering by resolution
6. What's new since last presentation 3
● Thumbnails recreation script
● 100% duplicates management accuracy
● More configurable system aspects as:
– Max upload photo size
– Max archive size
– Max file queue size
● Animated gif support
7. What's new since last presentation 4
● Animated gif support
● Completely fixed AJAX navigation usability, no
more confusing of available images to left or to
right.
● Front end design remake, thanks to
http://pauliusc.lt
● HTML output compression
● HTML 5 frontend changes, saves bandwidth
●
8. What's new since last presentation 5
● Some performance improvement regarding users
permissions settings
● More things moved to Memcached service
9. What's new since last presentation 5
V4
● Sort by relevance was introduced
● AddQuery usage implementation in search
● Refactored search page. One query less now.
● Paginator updates
● Sphinx wildcard support
● Images without original deletion script
● SEO enchancement related to resolution and user
current page
10. What's new since last presentation 5
V5
● Refactored captcha, it's now AJAX/javacript
based, performs well, plus saves one request on
image preview window
● Image preview full window cache!!! cached
windows is as fast as cached pagination around
5ms
● Image counter from log file, avoid insert on each
image preview window
11. What's new since last presentation 5
V5
● Mysql query hint for album pagination, mysql
planner choosed wrong indexes
● Smart selects in image preview window
● Full multilanguage support including translatable
module URL!!! none of my known gallery/cms
has this featyre. E.x gallery/search (engish) or
gallerie/recherche (french)
● Full InnoDB support. Performs well as MyISAM.
Top process is PHP not Mysql :)
12. Future works
● Pagination sharding with index filter shard table.
It should boost large sets of pagination around
100% > and keep constant speed with millions
of photos.
● http://remdex.info/Optimising-mysql-limit-performan
● Backend redesign
13. Issues with previous image gallery's I had
● A lot of users = a lot of problems
– No caching support
– Unoptimized SQL query's
– Resource hungry
– No framework used (well, perhaps this is not a problem, but most of the time
they just duplicate frameworks functionality, reinventing the wheel...)
– No Etag based caching, bandwidth saver...
15. Adopted software
● APC – opcode cache for PHP
● Sphinx – free open-source SQL full-text search engine (http://sphinxsearch.com/)
● Memcached – free & open source, high-performance, distributed memory object caching
system
(http://memcached.org/)
● eZ Components – an enterprise-ready, general-purpose PHP library of components used
independently or together for PHP application development.
(http://ez.no/ezcomponents)
● JQuery – is a fast and concise JavaScript Library that simplifies HTML document
traversing, event handling, animating, and Ajax interactions for rapid web development.
(http://jquery.com/)
● Lighttpd – lightweight open-source web server.
(http://www.lighttpd.net/)
● Mysql – database engine
(http://www.mysql.com)
16. Adopted software
● Ngnix - A HTTP and mail proxy server licensed
under a 2-clause BSD-like license.
(http://nginx.org/)
● Fully working ngnix config provided. For eshop
requirements and standard
17. Building process – core
● Gallery core is based on eZ Components. Used
components:
– Authentication
– Configuration
– Database
– Feed
– ImageAnalysis
– ImageConversion
– PersistentObject
– Translation
– Cache
– Url
– UserInput
18. Fulltext search implementation
● Why sphinx?
– Very very fast :)
● Used features of 9.9
– SetSelect – this feature was introduced in 9.9
version and allowed to make fancy filtering.
– Example in next slide
19. Image full mode problem with
previous and next image
● Search condition in literal. I need to find 2 previous
images based on current image position including
search keyword, sorting mode.
●
● URL consists of
– Current image ID (16679)
– Keyword (haposai)
– Sort mode (popular)
● How do I find out what should I display in two first thumbnails (middle image is current our image)?
●
20. Solution
● Use SetSelect query
$cl->SetSelect ( "*, (hits > '.$Image->hits.' OR (hits = '.$Image->hits.' AND pid > '.$Image-
>pid.')) AS myfilter" );
$cl->SetFilter ( "myfilter", array(1) );
● Things I do not know how to do till now. If sorting is based on relevance
how to now previous two images.
● I know now. But:
– SetSelect does not work with @weight attributes in it.
– Had to use two query's. SetFilter() works with @weight
– AddQuery comes in help here for perfromance. Mutch more
relevance images now.
21. Some search statistic
● Each day around 190 K querys. It were more if
search result page were not be cached :)
●
22. Mysql performance tweaking
● Just optimise querys (EXPLAIN is you friend)
● Not a single slow query
● Some tips:
– With large data sets use
– SELECT * FROM `lh_gallery_images`
– INNER JOIN ( SELECT pid FROM lh_gallery_images ORDER BY comtime DESC, pid DESC LIMIT 20 OFFSET 20
) AS items
– ON lh_gallery_images.pid = items.pid
– This query is at least 5x times faster than normal select.
Tested with (150 K records.)
– See - http://www.mysqlperformanceblog.com
23. Supported HTTP servers
● Lighttpd
● Apache
● Ngnix
– With ngnix managed to produce around 1200 Q/S
on cached page. It's 30% more than with
Lighttpd.
24. Caching objects
● Version caching
– http://www.bestechvideos.com/2009/03/21/railslab-scaling-rails-episode-8-memcached
– http://www.infoq.com/presentations/lutke-rockstar-memcaching
– Version cache were used in
● Album pages
● Last uploaded
● Last hits
● Popular images and so on.
● The most popular images in 24 hours
– Then cache is cleared?
● It's not, only version number is increased, and automatic cache self expire, because cache key does not
exists.
–
25. Some code with version cache
● Cache Key calculation in Album
● $cache = CSCacheAPC::getMem();
$cacheKey = md5('version_'.$cache->getCacheVersion('album_'.(int)$Params['user_parameters']['album_id']).
$mode.'album_view_url'.(int)$Params['user_parameters']['album_id'].'_page_'.$Params['user_parameters_unordered']['page']);
– Includes:
● Album version
● $mode – sorting mode (Ex. Popular)
● Page
this combination gives unique cache version for each page.
● Same logic applies to all listing pages
26. Some benchmarks[root@ks310613 ~]# ab -n 500 -c 10 http://animeonly.org/Fantasy/Mix-16a.html
This is ApacheBench, Version 2.0.40-dev <$Revision: 1.146 $> apache-2.0
Copyright 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/
Copyright 2006 The Apache Software Foundation, http://www.apache.org/
Benchmarking animeonly.org (be patient)
Completed 100 requests
Completed 200 requests
Completed 300 requests
Completed 400 requests
Finished 500 requests
Server Software: lighttpd
Server Hostname: animeonly.org
Server Port: 80
Document Path: /Fantasy/Mix-16a.html
Document Length: 26883 bytes
Concurrency Level: 10
Time taken for tests: 0.545137 seconds
Complete requests: 500
Failed requests: 0
Write errors: 0
Total transferred: 13593092 bytes
HTML transferred: 13441500 bytes
Requests per second: 917.20 [#/sec] (mean)
Time per request: 10.903 [ms] (mean)
Time per request: 1.090 [ms] (mean, across all concurrent requests)
Transfer rate: 24349.84 [Kbytes/sec] received
Connection Times (ms)
min mean[+/-sd] median max
Connect: 0 0 0.0 0 0
Processing: 5 10 2.9 9 23
Waiting: 4 9 3.1 9 23
Total: 5 10 2.9 9 23
Percentage of the requests served within a certain time (ms)
50% 9
66% 12
75% 13
80% 13
90% 13
95% 13
98% 20
27. Etag base caching
● What is it?
– An ETag (entity tag) is part of HTTP, the protocol
for the World Wide Web. It is a response header
that may be returned by an HTTP/1.1 compliant
web server and is used to determine change in
content at a given URL
(http://en.wikipedia.org/wiki/HTTP_ETag)
28. How to use it?
$ExpireTime = 3600;
$currentKeyEtag = md5($cacheKey.'user_id_'.erLhcoreClassUser::instance()->getUserID());;
header('Cache-Control: max-age=' . $ExpireTime); // must-revalidate
header('Expires: '.gmdate('D, d M Y H:i:s', time()+$ExpireTime).' GMT');
header('ETag: ' . $currentKeyEtag);
$iftag = isset($_SERVER['HTTP_IF_NONE_MATCH']) ? $_SERVER['HTTP_IF_NONE_MATCH'] ==
$currentKeyEtag : null;
if ($iftag === true)
{
header ("HTTP/1.0 304 Not Modified");
header ('Content-Length: 0');
exit;
}
● $cacheKey – from previous example cache key
● User ID is needed if user is logged in.
● Can be used for custom pages, that do not change
● Then image is uploaded or deleted, we just increase cache version and Etag is expired automatic
also.
●
30. Some MRTG screen shots 2
● Memcached status
●
●
● Traffic stats
●
31. Conclusions
● Single server with sphinx, memcached, mysql,
nginx handles per day around 180 K pageviews
daily.
● No performance issues at this time.
● Gallery home page
http://code.google.com/p/hppg/
32. Thank you for your attention :)
● Questions etc:
– remdex@gmail.com