اِنجیناِکس (به انگلیسی: nginx) یک کارساز وب با حجم پایین و کارایی بالا است که تحت مجوز بیاسدی منتشر میشود. این کارساز وب در یونیکس، گنو/لینوکس، بیاسدی، مک او اس و ویندوز اجرا میشود. بر طبق گفتهٔ نتکرافت، در حال حاضر ۱۲.۰۷٪ از دامنههای اینترنت از این کارساز استفاده میکنند.
این پروژه در سال ۲۰۰۱ بنیان نهاده شد و توسط یک توسعهدهنده مستقل به نام ایگور سیسووف (به انگلیسی: Igor Sysoev) به مرحله اجرا درآمد تا در یکی از وبسایتهای پرترافیک به نام رامبرلر به خدمت گرفته شود که این وبسایت در تاریخ سپتامبر ۲۰۰۸، روزانه بیش از ۵۰۰ میلیون درخواست HTTP داشته است. در حال حاضر وبسایتهای سرشناسی همچون فیسبوک، نتفلیکس، وردپرس، سورسفورج و ... از انجیناکس استفاده میکنند.[۶] در نسخه ۵٫۲ اوپنبیاسده که در نوامبر ۲۰۱۲ عرضه شد هم نرمافزار انجیناکس به صورت پیشفرض در سیستم قرار داده شد تا جایگزینی باشد برای آپاچی ۱٫۳. در نهایت در سال ۲۰۱۴ آپاچی از درخت کد منبع اوپنبیاسدی حذف شد.
اِنجیناِکس (به انگلیسی: nginx) یک کارساز وب با حجم پایین و کارایی بالا است که تحت مجوز بیاسدی منتشر میشود. این کارساز وب در یونیکس، گنو/لینوکس، بیاسدی، مک او اس و ویندوز اجرا میشود. بر طبق گفتهٔ نتکرافت، در حال حاضر ۱۲.۰۷٪ از دامنههای اینترنت از این کارساز استفاده میکنند.
این پروژه در سال ۲۰۰۱ بنیان نهاده شد و توسط یک توسعهدهنده مستقل به نام ایگور سیسووف (به انگلیسی: Igor Sysoev) به مرحله اجرا درآمد تا در یکی از وبسایتهای پرترافیک به نام رامبرلر به خدمت گرفته شود که این وبسایت در تاریخ سپتامبر ۲۰۰۸، روزانه بیش از ۵۰۰ میلیون درخواست HTTP داشته است. در حال حاضر وبسایتهای سرشناسی همچون فیسبوک، نتفلیکس، وردپرس، سورسفورج و ... از انجیناکس استفاده میکنند.[۶] در نسخه ۵٫۲ اوپنبیاسده که در نوامبر ۲۰۱۲ عرضه شد هم نرمافزار انجیناکس به صورت پیشفرض در سیستم قرار داده شد تا جایگزینی باشد برای آپاچی ۱٫۳. در نهایت در سال ۲۰۱۴ آپاچی از درخت کد منبع اوپنبیاسدی حذف شد.
A language for the Internet: Why JavaScript and Node.js is right for Internet...Tom Croucher
Increasingly we want to do more with the web and Internet applications we build. We have more features, more data, more users, more devices and all of it needs to be in real-time. With all of these demands how can we keep up? The answer is choosing a language and a platform that are optimized for the kind of architecture Internet and web applications really have. The traditional approach prioritises computation, assigning server resources before they are actually needed. JavaScript and Node.js both take an event driven approach only assigning resources to events as they happen. This allows us to make dramatic gains in performance and resource utilization while still having an environment which is fun and easy to program.
A talk I gave at the Boston Web Performance Meetup in August 2014.
Performance is one of the most challenging issues in modern web app design, in large part because modeling, testing, and validating performance before deploying to production is so challenging. While many ops teams have nailed down the problem of re-creating pre-production environments that closely mimic production, those environments frequently rely on known-good components beyond the application code itself: AWS ELB, F5 load balancers, CDNs, Varnish, and more.
Testing plug-in components like that can be challenging, because their performance characteristics don't directly align with application metrics.
- How many simultaneous users can my load balancer support? - What sort of network load will I put on my CDN (i.e., how much will it cost?) - How do different user behavior patterns affect performance?
In this meetup, we'll introduce a novel tool in this toolbox: tcpreplay, an open-source tool for replaying packet capture files back at an application. By replaying user traffic to a staging environment, you can test the effects of
- Network saturation to the load balancer - High numbers of users / IPs - Lots of traffic to your other monitoring tools!
Boyan Ivanov - latency, the #1 metric of your cloudShapeBlue
No two clouds are the same. Yet the leading clouds all have one thing in common: they deliver on metrics, which matter to the customer. In this session we'll dissect leading clouds, to show why low latency is the thing that makes a cloud stand out.
Grafana is not enough: DIY user interfaces for PrometheusWeaveworks
This talk gives a quick overview of the currently available Prometheus UIs and shows ways to build your own interfaces to enable your workflows. Most popular among the UIs is Grafana, which works well with Prometheus and is lovely for dashboarding, but terrible for troubleshooting. What do you do if you want to slightly modify queries based on your dashboards? How can you explore the keys and values of your metric labels quickly? Having trouble remembering PromQL syntax? This talk presents small building UI blocks to get to your results faster and save the day.
Jaime Piña, @variadico, Software Engineer at Apcera
Microservice issues are networking issues. Fixing code in your app is easy, but the hard part of using microservices is the networking. How do you actually know if you're sending what you think you are? Why does this request fail in my app, but not when I use curl? Is this service very slow or is it up at all?
This talk will help demystify some common problems you might experience while building out your collection of microservices. Once you can find the issue, it becomes way easier to fix.
Netty is an asynchronous event-driven network application framework for rapid development of maintainable high performance protocol servers & clients. AND IT'S TRUE!
In this talk given at JBCNConf 2015 in Barcelona, we will see how we use Netty at Trovit since 2013, what brought to us and how it opened our minds. We will share tips that helped us to learn more about Netty, some performance tricks and all things that worked for us.
A language for the Internet: Why JavaScript and Node.js is right for Internet...Tom Croucher
Increasingly we want to do more with the web and Internet applications we build. We have more features, more data, more users, more devices and all of it needs to be in real-time. With all of these demands how can we keep up? The answer is choosing a language and a platform that are optimized for the kind of architecture Internet and web applications really have. The traditional approach prioritises computation, assigning server resources before they are actually needed. JavaScript and Node.js both take an event driven approach only assigning resources to events as they happen. This allows us to make dramatic gains in performance and resource utilization while still having an environment which is fun and easy to program.
A talk I gave at the Boston Web Performance Meetup in August 2014.
Performance is one of the most challenging issues in modern web app design, in large part because modeling, testing, and validating performance before deploying to production is so challenging. While many ops teams have nailed down the problem of re-creating pre-production environments that closely mimic production, those environments frequently rely on known-good components beyond the application code itself: AWS ELB, F5 load balancers, CDNs, Varnish, and more.
Testing plug-in components like that can be challenging, because their performance characteristics don't directly align with application metrics.
- How many simultaneous users can my load balancer support? - What sort of network load will I put on my CDN (i.e., how much will it cost?) - How do different user behavior patterns affect performance?
In this meetup, we'll introduce a novel tool in this toolbox: tcpreplay, an open-source tool for replaying packet capture files back at an application. By replaying user traffic to a staging environment, you can test the effects of
- Network saturation to the load balancer - High numbers of users / IPs - Lots of traffic to your other monitoring tools!
Boyan Ivanov - latency, the #1 metric of your cloudShapeBlue
No two clouds are the same. Yet the leading clouds all have one thing in common: they deliver on metrics, which matter to the customer. In this session we'll dissect leading clouds, to show why low latency is the thing that makes a cloud stand out.
Grafana is not enough: DIY user interfaces for PrometheusWeaveworks
This talk gives a quick overview of the currently available Prometheus UIs and shows ways to build your own interfaces to enable your workflows. Most popular among the UIs is Grafana, which works well with Prometheus and is lovely for dashboarding, but terrible for troubleshooting. What do you do if you want to slightly modify queries based on your dashboards? How can you explore the keys and values of your metric labels quickly? Having trouble remembering PromQL syntax? This talk presents small building UI blocks to get to your results faster and save the day.
Jaime Piña, @variadico, Software Engineer at Apcera
Microservice issues are networking issues. Fixing code in your app is easy, but the hard part of using microservices is the networking. How do you actually know if you're sending what you think you are? Why does this request fail in my app, but not when I use curl? Is this service very slow or is it up at all?
This talk will help demystify some common problems you might experience while building out your collection of microservices. Once you can find the issue, it becomes way easier to fix.
Netty is an asynchronous event-driven network application framework for rapid development of maintainable high performance protocol servers & clients. AND IT'S TRUE!
In this talk given at JBCNConf 2015 in Barcelona, we will see how we use Netty at Trovit since 2013, what brought to us and how it opened our minds. We will share tips that helped us to learn more about Netty, some performance tricks and all things that worked for us.
Supercharging your PHP pages with mod_lsapi in CloudLinux OSCloudLinux
We’ve got big news - mod_lsapi is the fastest and most reliable way to serve PHP pages with Apache. It is a drop-in replacement for SuPHP, FCGID, RUID2, and ITK, has a low memory footprint and understands PHP directives from .htaccess files. It also supports PHP accelerators. It is fully compatible with PHP Selector, which allows end users to select the specific version of PHP they need. Here, learn more about this new production-ready feature, how it works and why it is so powerful.
Working with files in PHP can be a fun and a frustrating task; one you never know when you'll be asked to do. In our first beginner PHP talk, we'll go over how to work with files and some of the most common built in functions to help accomplish your tasks.
Let's look at the many "flavors" of PHP, why they are there, how they work and when to use them. We'll also dive a little into the PHP core design pattern of using SAPIs to access the true core application.
The study expands upon previous work in format extension. The initial research purposed extra space provided by an unrefined format to store metadata about the file in question. This process does not negatively impact the original intent of the format and allows for the creation of new derivative file types with both backwards compatibility and new features. The file format extension algorithm has been rewritten entirely in C++ and is now being distributed as an open source C/C++ static library, roughdraftlib. The files from our previous research are essentially binary compatible though a few extra fields have been added for developer convenience. The new data represents the current and oldest compatible versions of the binary and values representing the scaling ratio of the image. These new fields are statically included in every file and take only a few bytes to encode, so they have a trivial effect on the overall encoding density.
1. About Nginx
2. Benchmark test with concurrent request between Apache2.2 Vs Nginx ( with Vanilla configuration)
2.1 Benchmark on Big Image
2.2 Benchmark on Static Content File i,e. (. HTML)
2.3 Benchmark on PHP file (phpinfo())
3. Discuss Architecture of Nginx and Test result
4. How to configure PHP with Fast CGI on Nginx (Basic)
5. Question Answers
Everything you wanted to know about writing async, concurrent http apps in java Baruch Sadogursky
As presented at CodeMotion Tel Aviv:
Facing tens of millions of clients continuously downloading binaries from its repositories, JFrog decided to offer an OSS client that natively supports these downloads. This session shares the main challenges of developing a highly concurrent, resumable, async download library on top of an Apache HTTP client. It also covers other libraries JFrog tested and why it decided to reinvent the wheel. Consider yourself forewarned: lots of HTTP internals, NIO, and concurrency ahead!
You have amazing content and you want to get it to your users as fast as possible. In today’s industry, milliseconds matter and slow websites will never keep up. You can use a CDN but they are expensive, make you dependent on a third party to deliver your content, and can be notoriously inflexible. Enter Varnish, a powerful, open-source caching reverse proxy that lives in your network and lets you take control of how your content is managed and delivered. We’ll discuss how to install and configure Varnish in front of a typical web application, how to handle sessions and security, and how you can customize Varnish to your unique needs. This session will teach you how Varnish can help you give your users a better experience while saving your company and clients money at the same time.
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.
Based on original presentation by Dan Webb http://slidesha.re/dan_on_rack
Added some bits about Rails at the end, instead of other examples he had originally.
My Node.js workshop from Sela's Developer Conference 2015.
In the Workshop we covered The basics Node.js api's and the express web application framework.
Nginx 0.8.x + php 5.2.13 (fast cgi) setup web serverwruben
nginx [engine x] is a HTTP and reverse proxy server, as well as a mail proxy server written by Igor Sysoev. It has been running for more than five years on many heavily loaded Russian sites including Rambler (RamblerMedia.com).
Как Web-акселератор акселерирует ваш сайт / Александр Крижановский (Tempesta ...Ontico
В докладе я расскажу, что такое Web-акселератор, он же reverse proxy и он же - фронтенд. Как следует из названия, он ускоряет сайт. Но за счет чего он это делает? Какие они, вообще, бывают? Что они умеют, а что нет? В чем особенности каждого из решений? И, вообще, постараюсь рассказать о них вглубь и вширь.
Еще я расскажу про еще один Open Source Web-акселератор - Tempesta FW. Уникальность проекта в том, что это гибрид Web-акселератора и файервола, разрабатываемый специально для обработки и фильтрации больших объемов HTTP трафика. Основные сценарии использования системы — это защита от DDoS прикладного уровня и просто доставка больших объемов HTTP трафика малыми затратами на оборудование.
- Что такое Web-акселератор, зачем он был придуман и как понять когда он нужен;
- Типичный функционал reverse proxy, его отличия от Web-сервера;
- Упомянем про SSL акселераторы;
- Заглянем вглубь HTTP, и как он управляет кэшированием и проксированием, что может быть закэшированно, а что - нет;
- Мы сравним наиболее популярные акселераторы (Nginx, Varnish, Apache Traffic Server, Apache HTTPD, Squid) по фичам и внутренностям;
- Зачем нужен еще один Web-акселератор Tempesta FW, и в чем его отличие от других акселераторов.
Yet another talk :)
This time in a lecture called “Markup Languages und Anwendungen”
Went pretty ok, but as usual I talked a little bit too fast ^_^
http://www.marc-seeger.de
Generative AI Deep Dive: Advancing from Proof of Concept to ProductionAggregage
Join Maher Hanafi, VP of Engineering at Betterworks, in this new session where he'll share a practical framework to transform Gen AI prototypes into impactful products! He'll delve into the complexities of data collection and management, model selection and optimization, and ensuring security, scalability, and responsible use.
State of ICS and IoT Cyber Threat Landscape Report 2024 previewPrayukth K V
The IoT and OT threat landscape report has been prepared by the Threat Research Team at Sectrio using data from Sectrio, cyber threat intelligence farming facilities spread across over 85 cities around the world. In addition, Sectrio also runs AI-based advanced threat and payload engagement facilities that serve as sinks to attract and engage sophisticated threat actors, and newer malware including new variants and latent threats that are at an earlier stage of development.
The latest edition of the OT/ICS and IoT security Threat Landscape Report 2024 also covers:
State of global ICS asset and network exposure
Sectoral targets and attacks as well as the cost of ransom
Global APT activity, AI usage, actor and tactic profiles, and implications
Rise in volumes of AI-powered cyberattacks
Major cyber events in 2024
Malware and malicious payload trends
Cyberattack types and targets
Vulnerability exploit attempts on CVEs
Attacks on counties – USA
Expansion of bot farms – how, where, and why
In-depth analysis of the cyber threat landscape across North America, South America, Europe, APAC, and the Middle East
Why are attacks on smart factories rising?
Cyber risk predictions
Axis of attacks – Europe
Systemic attacks in the Middle East
Download the full report from here:
https://sectrio.com/resources/ot-threat-landscape-reports/sectrio-releases-ot-ics-and-iot-security-threat-landscape-report-2024/
SAP Sapphire 2024 - ASUG301 building better apps with SAP Fiori.pdfPeter Spielvogel
Building better applications for business users with SAP Fiori.
• What is SAP Fiori and why it matters to you
• How a better user experience drives measurable business benefits
• How to get started with SAP Fiori today
• How SAP Fiori elements accelerates application development
• How SAP Build Code includes SAP Fiori tools and other generative artificial intelligence capabilities
• How SAP Fiori paves the way for using AI in SAP apps
Observability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdfPaige Cruz
Monitoring and observability aren’t traditionally found in software curriculums and many of us cobble this knowledge together from whatever vendor or ecosystem we were first introduced to and whatever is a part of your current company’s observability stack.
While the dev and ops silo continues to crumble….many organizations still relegate monitoring & observability as the purview of ops, infra and SRE teams. This is a mistake - achieving a highly observable system requires collaboration up and down the stack.
I, a former op, would like to extend an invitation to all application developers to join the observability party will share these foundational concepts to build on:
Essentials of Automations: Optimizing FME Workflows with ParametersSafe Software
Are you looking to streamline your workflows and boost your projects’ efficiency? Do you find yourself searching for ways to add flexibility and control over your FME workflows? If so, you’re in the right place.
Join us for an insightful dive into the world of FME parameters, a critical element in optimizing workflow efficiency. This webinar marks the beginning of our three-part “Essentials of Automation” series. This first webinar is designed to equip you with the knowledge and skills to utilize parameters effectively: enhancing the flexibility, maintainability, and user control of your FME projects.
Here’s what you’ll gain:
- Essentials of FME Parameters: Understand the pivotal role of parameters, including Reader/Writer, Transformer, User, and FME Flow categories. Discover how they are the key to unlocking automation and optimization within your workflows.
- Practical Applications in FME Form: Delve into key user parameter types including choice, connections, and file URLs. Allow users to control how a workflow runs, making your workflows more reusable. Learn to import values and deliver the best user experience for your workflows while enhancing accuracy.
- Optimization Strategies in FME Flow: Explore the creation and strategic deployment of parameters in FME Flow, including the use of deployment and geometry parameters, to maximize workflow efficiency.
- Pro Tips for Success: Gain insights on parameterizing connections and leveraging new features like Conditional Visibility for clarity and simplicity.
We’ll wrap up with a glimpse into future webinars, followed by a Q&A session to address your specific questions surrounding this topic.
Don’t miss this opportunity to elevate your FME expertise and drive your projects to new heights of efficiency.
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.
Transcript: Selling digital books in 2024: Insights from industry leaders - T...BookNet Canada
The publishing industry has been selling digital audiobooks and ebooks for over a decade and has found its groove. What’s changed? What has stayed the same? Where do we go from here? Join a group of leading sales peers from across the industry for a conversation about the lessons learned since the popularization of digital books, best practices, digital book supply chain management, and more.
Link to video recording: https://bnctechforum.ca/sessions/selling-digital-books-in-2024-insights-from-industry-leaders/
Presented by BookNet Canada on May 28, 2024, with support from the Department of Canadian Heritage.
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
PHP Frameworks: I want to break free (IPC Berlin 2024)Ralf Eggert
In this presentation, we examine the challenges and limitations of relying too heavily on PHP frameworks in web development. We discuss the history of PHP and its frameworks to understand how this dependence has evolved. The focus will be on providing concrete tips and strategies to reduce reliance on these frameworks, based on real-world examples and practical considerations. The goal is to equip developers with the skills and knowledge to create more flexible and future-proof web applications. We'll explore the importance of maintaining autonomy in a rapidly changing tech landscape and how to make informed decisions in PHP development.
This talk is aimed at encouraging a more independent approach to using PHP frameworks, moving towards a more flexible and future-proof approach to PHP development.
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdf91mobiles
91mobiles recently conducted a Smart TV Buyer Insights Survey in which we asked over 3,000 respondents about the TV they own, aspects they look at on a new TV, and their TV buying preferences.
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024Albert Hoitingh
In this session I delve into the encryption technology used in Microsoft 365 and Microsoft Purview. Including the concepts of Customer Key and Double Key Encryption.
3. Retwis-RB
"An example Twitter application using the Redis key-value
database" --> http://github.com/danlucraft/retwis-rb
sinatra redis
require 'rubygems' require 'rubygems'
require 'sinatra' require 'redis'
get '/hi' do
"Hello World!" r = Redis.new
end puts "set foo to bar"
r['foo'] = 'bar'
4. Redis Benchmark
root@keyvalue:~# redis-benchmark -q
SET: 105273.69 requests per second
GET: 107526.88 requests per second
INCR: 95238.10 requests per second
LPUSH: 121987.80 requests per second
LPOP: 108728.26 requests per second
PING: 133386.66 requests per second
8. Home Tests:
httperf --server=localhost --port=4567 --uri=/test --num-
conns=100 --num-calls=50
Webserver: "thin"
EventMachine:
a library for Ruby, C++, and Java programs. It provides event-
driven I/O using the Reactor pattern
9. single connection
home
Total:
Request rate 56.7 req/s
connections 1 (17.6 ms/req)
requests 500 Reply rate min 41.6
[replies/s] avg 41.6
replies 500 max 41.6
Reply time response 17.6
[ms] transfer 0.0
Reply status: 1xx=0 2xx=500 3xx=0 4xx=0 5xx=0
test-duration 8.824 s
10. 100 connections
home
Total:
Request rate 48.5 req/s
connections 100 (20.6 ms/req)
requests 5000
Reply rate min 16.2
replies 5000 [replies/s] avg 48.7
max 71.6
Reply time response 20.6
[ms] transfer 0.0
Reply status: 1xx=0 2xx=5000 3xx=0 4xx=0 5xx=0
test-duration 103.160 s
12. Nginx ...
is...
a lightweight Web Server
a Reverse Proxy
an IMAP/POP3 proxy
used by 14,988,610 domains today
implmented by larges sites as WordPress, Github,
SourceForge etc.
13. Nginx vs Apache
Apache
process based
each connection requires a new thread
high concurrency
-> high memory usage
-> CPU overhead (e.g. context switches)
PHP is usally included in Apache Web Server as module (mod_php)
Nginx
fork of apache 1.3 with the multi-processing ripped out in favor of an
event loop
asynchronous model (event based)
uses only one thread for all connections (master thread)
PHP is used as seperate process over FastCGI (PHP-FPM)
Web Server and PHP-FPM are used as seperate applications
communication via TCP-connetions or Unix-sockets
-> little overhead due to communication costs
14. Event Loop
What is an event loop?
usually you write code like:
var result = db.query("select..");
result.do_something();
but an event loop looks like:
db.query("select..", function (result) { result.do_something()});
15. Motivation
Apache+mod_php compared to Nginx+php-fpm
(comparison made by Boštjan Škufca - http://blog.a2o.si))
5 Different scenarios
HelloWorld.php – simple echo of “Hello, World!” (13 bytes),
HelloWorld.txt – static file with “Hello, World!” (also 13 bytes)
100KB.txt – static content
1MB.txt - static content
index.php – more complex site with several DB-queries, HTML
template parsing…
Tests with keepalive-feature [-k] and without keepalive
(same socket can be used for request and response)
16. Benchmark Setup
Benchmark tests conducted using
ApacheBench
ab -n NREQ -c NCONC [-k] http://server.domain.
com/bench/FileName
NREQ is the number of requests:
- HelloWorld.php: 500000
- HelloWorld.txt: 500000
- 100KB.txt: 500000
- 1MB.txt: 50000
- AppFront: 5000
NCONC = number of concurrent requests
1 ,2,4,8,16,32,64,128,256,512
17. PHP-generated Hello World!
Apche is always faster than Nginx
This demonstrates the overhead of the
communication between Nginx and PHP-
FPM
18. Static Hello World!
Nginx with keepalive is more than twice as fast as
Apache
This demonstrates the overhead that is caused by
creating TCP-connections
19. Static 100kb.txt File
This test should demonstrate a „real world
“ example of a static page request
Again, Nginx is twice as fast as Apache
20. 1MB.txt File
This test demonstates a more complex file transfer
Keepalive was not tested, because the file size is so
large that TCP-connections aren‘t important
Nginx is just slightly better
21. Application Frontpage (index.
php)
Again a „real world“ example with a more
complex PHP-site
Nginx is just slightly better
22. Apache PHP vs TXT
Dynamically generated content and static
content are nearly equally fast
23. Nginx PHP vs TXT
Nginx serves static content twice as fast
as dynamic content
25. Conclusion
When is it worth to use Nginx?
If you have limited hardware resources
(e.g. on VPS)
If you have a lot of static content
26. Further Alternative
Nginx works as reverse proxy
static content is passed by Nginx (e.g. Pictures)
dynamic Content will be forwarded to an Apache
behind the proxy
advantages:
static content will be returned very fast
slow user connections do no longer hold
resources, because the "blocking"
connection is now between Nginx and
Apache; not the user and Apache
27. our problems
mysql dumps:
create dump + copy dump + insert dump = hours
loadtesting:
client == server
--> no testing for high concurrency, no isolation of variables.
client too slow
different configurations
keepalives
Nginx workers/processes vs apache threads/clients
...