This document provides an overview of Varnish, an open source caching reverse proxy that can accelerate web applications. It discusses what Varnish is, how it works, basic and advanced configuration options like backends, VCL, caching strategies, and Edge Side Includes. Installation and usage is demonstrated on common operating systems. The presentation aims to help attendees understand when and how to use Varnish to improve application performance.
The venerable Servlet Container still has some performance tricks up its sleeve - this talk will demonstrate Apache Tomcat's stability under high load, describe some do's (and some don'ts!), explain how to performance test a Servlet-based application, troubleshoot and tune the container and your application and compare the performance characteristics of the different Tomcat connectors. The presenters will share their combined experience supporting real Tomcat applications for over 20 years and show how a few small changes can make a big, big difference.
The venerable Servlet Container still has some performance tricks up its sleeve - this talk will demonstrate Apache Tomcat's stability under high load, describe some do's (and some don'ts!), explain how to performance test a Servlet-based application, troubleshoot and tune the container and your application and compare the performance characteristics of the different Tomcat connectors. The presenters will share their combined experience supporting real Tomcat applications for over 20 years and show how a few small changes can make a big, big difference.
Perforce Administration: Optimization, Scalability, Availability and ReliabilityPerforce
In this session, Michael Mirman of MathWorks describes the infrastructure and maintenance procedures that the company uses to provide disaster recovery mechanisms, minimize downtime and improve load balance.
Learn how to load balance your applications following best practices with NGINX and NGINX Plus.
Join this webinar to learn:
- How to configure basic HTTP load balancing features
- The essential elements of load balancing: session persistence, health checks, and SSL termination
- How to load balance MySQL, DNS, and other common TCP/UDP applications
- How to have NGINX Plus automatically discover new service instances in an auto-scaling or microservices environment
Apache Camel: Jetty Component With ExampleAmit Aggarwal
After Watching this video, you will be answer the following.
1. What is Jetty?
2. What is apache camel jetty component?
3. Required maven dependency for jetty component
4. Hello World in Jetty Consumer.
5. Different URI Formats.
6. Http Session Example Using jetty options.
7. Http Servlet Request Example of Camel Jetty.
8. How to access request parameters.
9. Import link for reading about jetty.
CRX2Oak - all the secrets of repository migrationTomasz Rękawek
CRX2Oak is an official migration tool that allows to migrate data between different repository types. The most common use-case is upgrading an old, CQ 5.x repository to the AEM 6.x format. This session will cover the basic CRX2Oak usage, describe it's more advanced options and also share some real-world cases of large-scale (hundreds of GBs) data migration cases.
Making distributed storage easy: usability in Ceph Luminous and beyondSage Weil
Distributed storage is complicated, and historically Ceph hasn't spent a lot of time trying to hide that complexity, instead focusing on correctness, features, and flexibility. There has been a recent shift in focus to simplifying and streamlining the user/operator experience so that the information that is actually important is available without the noise of irrelevant details. Recent feature work has also focused on simplifying configurations that were previously possible but required tedious configuration steps to manage.
This talk will cover the key new efforts in Ceph Luminous that aim to simplify and automate cluster management, as well as the plans for upcoming releases to address longstanding Cephisms that make it "hard" (e.g., choosing PG counts).
Content caching is one of the most effective ways to dramatically improve the performance of a web site. In this webinar, we’ll deep-dive into NGINX’s caching abilities and investigate the architecture used, debugging techniques and advanced configuration. By the end of the webinar, you’ll be well equipped to configure NGINX to cache content exactly as you need.
View full webinar on demand at http://nginx.com/resources/webinars/content-caching-nginx/
Massively Scaled High Performance Web Services with PHPDemin Yin
Over the years, people have questioned if PHP is a good choice for building web services. In this talk, I will share how we use PHP on the backend for Glu Mobile’s flagship mobile game Design Home, enabling it to regularly rank amongst the top free mobile games in the Apple App Store and the Google Play Store. We will deep dive into the thought processes, development, testing, and deployment strategy, showcasing what we have achieved with PHP.
4Developers 2015: Scaling LAMP doesn't have to suck - Sebastian GrodzickiPROIDEA
Sebastian Grodzicki
Language: Polish
Tradycyjny LAMP sprawdza się świetnie … w środowisku deweloperskim. Nawet jeżeli nie tworzysz kolejnego Facebooka, to każda niedostępność Twojego serwisu kosztuje Cię sporo nerwów oraz pieniędzy. Awaria wystąpi wcześniej lub później. Pytanie nie brzmi "czy" leczy "kiedy". Dlatego warto o tym pomyśleć zawczasu i zbudować taką architekturę, która nie jest podatna na niedostępność z powodu awarii jednego z jej elementów. Jakie narzędzia wybrać? Jak wycisnąć z nich ostatnie soki?
Extending Foreman the easy way with foreman_hooksDominic Cleal
Foreman sits at the intersection of lots of systems - those that we know about, like DHCP or DNS, but also many that are unique to your business or technologies. In this talk, we'll introduce foreman_hooks, a plugin to quickly extend Foreman with shell scripts to solve these integration problems.
Basic concept of nginx , Apache Vs Nginx , Nginx as Loadbalancer , Nginx as Reverse proxy , Configuration of nginx as load balancer and reverse proxy .
Perforce Administration: Optimization, Scalability, Availability and ReliabilityPerforce
In this session, Michael Mirman of MathWorks describes the infrastructure and maintenance procedures that the company uses to provide disaster recovery mechanisms, minimize downtime and improve load balance.
Learn how to load balance your applications following best practices with NGINX and NGINX Plus.
Join this webinar to learn:
- How to configure basic HTTP load balancing features
- The essential elements of load balancing: session persistence, health checks, and SSL termination
- How to load balance MySQL, DNS, and other common TCP/UDP applications
- How to have NGINX Plus automatically discover new service instances in an auto-scaling or microservices environment
Apache Camel: Jetty Component With ExampleAmit Aggarwal
After Watching this video, you will be answer the following.
1. What is Jetty?
2. What is apache camel jetty component?
3. Required maven dependency for jetty component
4. Hello World in Jetty Consumer.
5. Different URI Formats.
6. Http Session Example Using jetty options.
7. Http Servlet Request Example of Camel Jetty.
8. How to access request parameters.
9. Import link for reading about jetty.
CRX2Oak - all the secrets of repository migrationTomasz Rękawek
CRX2Oak is an official migration tool that allows to migrate data between different repository types. The most common use-case is upgrading an old, CQ 5.x repository to the AEM 6.x format. This session will cover the basic CRX2Oak usage, describe it's more advanced options and also share some real-world cases of large-scale (hundreds of GBs) data migration cases.
Making distributed storage easy: usability in Ceph Luminous and beyondSage Weil
Distributed storage is complicated, and historically Ceph hasn't spent a lot of time trying to hide that complexity, instead focusing on correctness, features, and flexibility. There has been a recent shift in focus to simplifying and streamlining the user/operator experience so that the information that is actually important is available without the noise of irrelevant details. Recent feature work has also focused on simplifying configurations that were previously possible but required tedious configuration steps to manage.
This talk will cover the key new efforts in Ceph Luminous that aim to simplify and automate cluster management, as well as the plans for upcoming releases to address longstanding Cephisms that make it "hard" (e.g., choosing PG counts).
Content caching is one of the most effective ways to dramatically improve the performance of a web site. In this webinar, we’ll deep-dive into NGINX’s caching abilities and investigate the architecture used, debugging techniques and advanced configuration. By the end of the webinar, you’ll be well equipped to configure NGINX to cache content exactly as you need.
View full webinar on demand at http://nginx.com/resources/webinars/content-caching-nginx/
Massively Scaled High Performance Web Services with PHPDemin Yin
Over the years, people have questioned if PHP is a good choice for building web services. In this talk, I will share how we use PHP on the backend for Glu Mobile’s flagship mobile game Design Home, enabling it to regularly rank amongst the top free mobile games in the Apple App Store and the Google Play Store. We will deep dive into the thought processes, development, testing, and deployment strategy, showcasing what we have achieved with PHP.
4Developers 2015: Scaling LAMP doesn't have to suck - Sebastian GrodzickiPROIDEA
Sebastian Grodzicki
Language: Polish
Tradycyjny LAMP sprawdza się świetnie … w środowisku deweloperskim. Nawet jeżeli nie tworzysz kolejnego Facebooka, to każda niedostępność Twojego serwisu kosztuje Cię sporo nerwów oraz pieniędzy. Awaria wystąpi wcześniej lub później. Pytanie nie brzmi "czy" leczy "kiedy". Dlatego warto o tym pomyśleć zawczasu i zbudować taką architekturę, która nie jest podatna na niedostępność z powodu awarii jednego z jej elementów. Jakie narzędzia wybrać? Jak wycisnąć z nich ostatnie soki?
Extending Foreman the easy way with foreman_hooksDominic Cleal
Foreman sits at the intersection of lots of systems - those that we know about, like DHCP or DNS, but also many that are unique to your business or technologies. In this talk, we'll introduce foreman_hooks, a plugin to quickly extend Foreman with shell scripts to solve these integration problems.
Basic concept of nginx , Apache Vs Nginx , Nginx as Loadbalancer , Nginx as Reverse proxy , Configuration of nginx as load balancer and reverse proxy .
Challenges when building high profile editorial sitesYann Malet
This talk will be a walk through the challenges encountered when building a high profile editorial sites. My goal is to present some of the common pitfalls we have encountered at Lincoln Loop and to explain how we solved:
* Legacy migration always take longer
* devops
* Multiple environment
* Easy deployment
* Responsive design impacts the backend
* Journey of an image
* Picturefill.js
* Danger of reusing published django applications
* Caching strategy
* Html fragment
* Varnish
Audience Decision maker that are going to rebuild their magazine Developer bidding for this kind of projects for the first time
PHP London Dec 2013 - Varnish - The 9 circles of hellluis-ferro
Varnish is an HTTP accelerator. Its use will allow you to server more content/requests with the same or even less hardware. But with all good things, for each use,the complexity of your solution will increase.
On this talk, I will show how to use Varnish to implement some advanced cache solutions like adding GeoIP processing on varnish and ESI (Edge Side Includes).
The need to scale is in high demand in an age where everything is moving to the cloud. Though the standard Apache configuration could handle a website with moderate traffic, the minute it gets slash dotted or twitted multiple times could spell an embarrassing crash landing! If you are the administrator of such a website then good luck finding another job! On the other hand you value high availability in the midst of popularity then read on. On this one day workshop, we will show you how to scale your website and webapps to scale to handle thousands of simultaneous sessions the right way. The topics covered will include:
- Setting up Apache and NGiNXM
- Setting up a sample LAMP web app
- Benchmarking Apache performance
- Fine tuning Apache to improve performance
- Fine tuning NGiNX to improve performance
- Discussion about code level improvements when developing custom webapps using PHP
Presentation Video: http://youtu.be/hZQc335WIvc
Goals:
Thorough understanding of Varnish.
Understanding of how VCL works and how to use it.
Know how varnish works with Drupal and Wordpress.
Debug using varnish tools.
Extending OpenShift Origin: Build Your Own Cartridge with Bill DeCoste of Red...OpenShift Origin
Extending OpenShift Origin: Build Your Own Cartridge
Presenters: Bill DeCoste
Cartridges allow developers to provide services running on top of the Red Hat OpenShift Platform-as-a-Service (PaaS). OpenShift already provides cartridges for numerous web application frameworks and databases. Writing your own cartridges allows you to customize or enhance an existing service, or provide new services. In this session, the presenter will discuss best practices for cartridge development and the latest changes in the OpenShift cartridge support.
* Latest changes made in the platform to ease cartridge development
* OpenShift Cartridges vs. plugins
* Outline for development of a new cartridge
* Customization of existing cartridges
* Quickstarts: leveraging a cartridge or cartridges to provide a complete application
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.
[HKOSCON][20180616][Containerized High Availability Virtual Hosting Deploymen...Wong Hoi Sing Edison
Hong Kong Open Source Conference 2018
Containerized High Availability Virtual Hosting Deployment with Kubernetes, Docker and Ansible
https://hkoscon.org/2018/topic/containerized-high-availability-virtual-hosting-deployment-kubernetes-docker-and-ansible/
Unit test your java architecture with ArchUnitJeremy Cook
From Confoo 2021.
Software architecture tends to be esoteric and intangible. The result of this is architectural drift, with the architecture losing the qualities it was promoting as the code evolves. This talk will introduce ArchUnit, a library that allows you to test your Java architecture. You'll see how to write unit tests that protect architectural characteristics in your code while making your architecture easier to understand for everyone in your team.
Tracking your data across the fourth dimensionJeremy Cook
How can you track all changes to your data across time? This talk will introduce you to the techniques you need to do that. We’ll examine the theory behind temporal database tables as well as the changes in the SQL:2011 standard that support them. We’ll also look at how you can implement temporal tables, both for DBMS that support SQL:2011 and those that don't. By the end of this talk you should be able to take your data to the fourth dimension.
MVC allows you to divide responsibilities in your application but offers no help in building the most critical part: the domain logic. This talk will introduce ways that can help you to encapsulate the richness of your domain. We'll look at patterns such as Action Domain Responder and Hexagonal Architecture before introducing Domain Driven Design. Find out how to get beyond MVC and begin modelling your domains in rich, powerful and reusable ways.
Given at TrueNorthPHP 2014:
"MVC presents a great way to divide responsibilities in your application but it offers no help in building the most critical part: the model or domain. This talk will introduce ways that can help you to encapsulate the richness of your domain. We'll look at Action Domain Response as a new way of thinking about the concepts presented in MVC before examining Hexagonal Architecture, allowing you to easily reuse your domain across multiple delivery mechanisms. We'll then finish with an introduction to Domain Driven Design, a technique that allows you to closely align your domain with the business problems it is solving while helping keep things well designed and easily maintainable. By the end of this talk you should have the knowledge needed to begin modelling your domains more powerfully while keeping them aligned to the real world problems they solve."
Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024Tobias Schneck
As AI technology is pushing into IT I was wondering myself, as an “infrastructure container kubernetes guy”, how get this fancy AI technology get managed from an infrastructure operational view? Is it possible to apply our lovely cloud native principals as well? What benefit’s both technologies could bring to each other?
Let me take this questions and provide you a short journey through existing deployment models and use cases for AI software. On practical examples, we discuss what cloud/on-premise strategy we may need for applying it to our own infrastructure to get it to work from an enterprise perspective. I want to give an overview about infrastructure requirements and technologies, what could be beneficial or limiting your AI use cases in an enterprise environment. An interactive Demo will give you some insides, what approaches I got already working for real.
The Art of the Pitch: WordPress Relationships and SalesLaura Byrne
Clients don’t know what they don’t know. What web solutions are right for them? How does WordPress come into the picture? How do you make sure you understand scope and timeline? What do you do if sometime changes?
All these questions and more will be explored as we talk about matching clients’ needs with what your agency offers without pulling teeth or pulling your hair out. Practical tips, and strategies for successful relationship building that leads to closing the deal.
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.
JMeter webinar - integration with InfluxDB and GrafanaRTTS
Watch this recorded webinar about real-time monitoring of application performance. See how to integrate Apache JMeter, the open-source leader in performance testing, with InfluxDB, the open-source time-series database, and Grafana, the open-source analytics and visualization application.
In this webinar, we will review the benefits of leveraging InfluxDB and Grafana when executing load tests and demonstrate how these tools are used to visualize performance metrics.
Length: 30 minutes
Session Overview
-------------------------------------------
During this webinar, we will cover the following topics while demonstrating the integrations of JMeter, InfluxDB and Grafana:
- What out-of-the-box solutions are available for real-time monitoring JMeter tests?
- What are the benefits of integrating InfluxDB and Grafana into the load testing stack?
- Which features are provided by Grafana?
- Demonstration of InfluxDB and Grafana using a practice web application
To view the webinar recording, go to:
https://www.rttsweb.com/jmeter-integration-webinar
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...DanBrown980551
Do you want to learn how to model and simulate an electrical network from scratch in under an hour?
Then welcome to this PowSyBl workshop, hosted by Rte, the French Transmission System Operator (TSO)!
During the webinar, you will discover the PowSyBl ecosystem as well as handle and study an electrical network through an interactive Python notebook.
PowSyBl is an open source project hosted by LF Energy, which offers a comprehensive set of features for electrical grid modelling and simulation. Among other advanced features, PowSyBl provides:
- A fully editable and extendable library for grid component modelling;
- Visualization tools to display your network;
- Grid simulation tools, such as power flows, security analyses (with or without remedial actions) and sensitivity analyses;
The framework is mostly written in Java, with a Python binding so that Python developers can access PowSyBl functionalities as well.
What you will learn during the webinar:
- For beginners: discover PowSyBl's functionalities through a quick general presentation and the notebook, without needing any expert coding skills;
- For advanced developers: master the skills to efficiently apply PowSyBl functionalities to your real-world scenarios.
Software Delivery At the Speed of AI: Inflectra Invests In AI-Powered QualityInflectra
In this insightful webinar, Inflectra explores how artificial intelligence (AI) is transforming software development and testing. Discover how AI-powered tools are revolutionizing every stage of the software development lifecycle (SDLC), from design and prototyping to testing, deployment, and monitoring.
Learn about:
• The Future of Testing: How AI is shifting testing towards verification, analysis, and higher-level skills, while reducing repetitive tasks.
• Test Automation: How AI-powered test case generation, optimization, and self-healing tests are making testing more efficient and effective.
• Visual Testing: Explore the emerging capabilities of AI in visual testing and how it's set to revolutionize UI verification.
• Inflectra's AI Solutions: See demonstrations of Inflectra's cutting-edge AI tools like the ChatGPT plugin and Azure Open AI platform, designed to streamline your testing process.
Whether you're a developer, tester, or QA professional, this webinar will give you valuable insights into how AI is shaping the future of software delivery.
Accelerate your Kubernetes clusters with Varnish CachingThijs Feryn
A presentation about the usage and availability of Varnish on Kubernetes. This talk explores the capabilities of Varnish caching and shows how to use the Varnish Helm chart to deploy it to Kubernetes.
This presentation was delivered at K8SUG Singapore. See https://feryn.eu/presentations/accelerate-your-kubernetes-clusters-with-varnish-caching-k8sug-singapore-28-2024 for more details.
UiPath Test Automation using UiPath Test Suite series, part 3DianaGray10
Welcome to UiPath Test Automation using UiPath Test Suite series part 3. In this session, we will cover desktop automation along with UI automation.
Topics covered:
UI automation Introduction,
UI automation Sample
Desktop automation flow
Pradeep Chinnala, Senior Consultant Automation Developer @WonderBotz and UiPath MVP
Deepak Rai, Automation Practice Lead, Boundaryless Group and UiPath MVP
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.
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.
Elevating Tactical DDD Patterns Through Object CalisthenicsDorra BARTAGUIZ
After immersing yourself in the blue book and its red counterpart, attending DDD-focused conferences, and applying tactical patterns, you're left with a crucial question: How do I ensure my design is effective? Tactical patterns within Domain-Driven Design (DDD) serve as guiding principles for creating clear and manageable domain models. However, achieving success with these patterns requires additional guidance. Interestingly, we've observed that a set of constraints initially designed for training purposes remarkably aligns with effective pattern implementation, offering a more ‘mechanical’ approach. Let's explore together how Object Calisthenics can elevate the design of your tactical DDD patterns, offering concrete help for those venturing into DDD for the first time!
2. Who?
●
●
●
Ex-pat Englishman, now living in Southern
Ontario.
Web developer for 5 years, mostly PHP.
(Almost) Senior Software Engineer at
TribeHR.
●
Co-organiser of Guelph PHP User Group.
●
Ex-professional musician.
4. What is Varnish?
●
●
Open source caching reverse proxy or
HTTP accelerator.
Mature software:
–
–
●
Current version: 3.0.5
Varnish 4 currently in tech preview.
Used by 5% (500) of the top 10,000
sites on the internet.
5. Varnish basics
●
Listens on a port (normally 80).
●
When a request arrives:
–
–
●
If content is already in cache it is served
directly.
If not Varnish forwards the request to a
'backend' server, delivering the content
when it is received.
Only caches GET and HEAD requests.
6. Varnish features
●
●
●
Can cache any kind of content
delivered via HTTP.
Blazingly fast with incredible
performance.
Support for multiple backends and
basic load balancing.
15. Installing Varnish
●
Use system package manager.
–
●
●
For Debian, Ubuntu and RedHat/CentOS
Varnish software maintains repositories
with up to date versions.
To obtain up to date version to install
on non-core supported platforms
compile from source.
More info at the Varnish website.
16. Basic configuration
●
●
Ships with an excellent, 'sane' default
VCL configuration.
To begin using Varnish:
–
Configure runtime options
(/etc/default/varnish).
–
Add one or more backends to VCL file
(/etc/varnish/default.vcl).
17. Adding VCL backends
●
●
●
Must add at least one backend in VCL.
If more than one, first will be the
default.
Backends can be grouped into
'directors' to apply load balancing.
20. Introduction to VCL
●
Provides a window into Varnish's state
during the request/response cycle.
●
Not a full programming language.
●
C/Perl-like syntax.
●
Compiled into a C shared object at
runtime and loaded into Varnish.
21. VCL Subroutines
●
●
Dispatched at different times in the
request/response cycle.
Each routine has default code:
–
Varnish appends this to the end of any code
you add.
–
Can be short-circuited by using the return
keyword. Be careful!
●
Allowed return values documentation.
●
You can also define your own.
24. VCL Functions
●
Functions Varnish makes available to you:
–
–
regsub(str, regex, sub)
–
regsuball(str, regex, sub)
–
ban(ban expression)
–
ban_url(regex) (Deprecated)
–
purge()
–
●
hash_data(str)
return()
Also have set and unset keywords to manipulate
variables and call to dispatch your own subroutines.
25. vcl_recv
●
●
Called once the OS kernel has given
the complete request to Varnish.
Typical uses:
–
Set the backend to use.
–
Amend the request.
–
Add extra information to the request.
–
Force a bypass of cache lookups (pass or
pipe).
26. vcl_fetch
●
●
Called when a response is received
from a backend, before it is considered
for inclusion in the cache.
Typical uses:
–
Amend or set a TTL.
–
Add or remove HTTP headers.
–
Detect errors (more later).
–
Turn on ESI processing.
27. Select a backend
backend default {
.host = "192.168.2.1";
.port = "8080";
}
backend bar {
.host = "192.168.2.2";
.port = "8080":
}
sub vcl_recv {
if (req.http.host ~ "bar.com") {
set req.backend = bar;
}
// etc
}
28. Remove cookies
sub vcl_recv {
if (req.url !~ "^/admin/.*") {
unset req.http.cookie;
}
}
sub vcl_fetch {
if (req.url !~ "^/admin/.*") {
unset beresp.http.set-cookie;
}
}
29. Set default TTL
sub vcl_fetch {
if (! beresp.http.cache-control &&
beresp.http.content-type ~ "text/html|
text/xml|application/json") {
set beresp.ttl = 5m;
}
}
30. VMOD's
●
Allow you to extend Varnish's features.
●
Written in C.
●
●
Community VMOD's at
https://www.varnish-cache.org/vmods
Examples:
–
Geo-IP lookup (BBC)
–
Query string normalisation
–
Memcache
31. Grace mode
●
●
●
Graced content is an object that has
expired but is kept in cache.
Grace mode is when a graced object is
used.
When this can happen:
–
No healthy backends are available.
–
Deliver old content while fetching new
content is pending.
32. Configuring grace
sub vcl_recv {
if (req.backend.healthy) {
set req.grace = 30s;
} else {
set req.grace = 1h;
}
}
sub vcl_fetch {
set beresp.grace = 1h;
}
34. Saint mode
●
●
●
Allows you to say that a backend is
'sick' for one url.
Varnish will not make further requests
to that backend for the url for the time
specified.
Gives you a chance to detect errors in
responses.
36. Edge Side Includes
●
●
Allows different content on the same
page to be cached for different times.
Request flow:
–
–
●
External request returns a page with special
ESI tags in it.
For each ESI tag Varnish issues a sub
request which generates the content.
Both 'master' and sub requests can be
cached.
Mention jaw dropping nature of it...
Talk is an intro to what varnish is, what it can do and when it is (as well as is not) the right tool for the job.
Explain what a caching reverse proxy is.
Varnish users: BBC, Synacor, Slideshare, Facebook(?), Twitter(search), Forbes.com and NY Times.
Mention that I have stories about how these organisations are using Varnish but no time...
Varnish's definition of a backend: any http server that can produce content that can potentially be cached.
Safe http methods.
Mention html, json, xml, css, javascript, images, media files, etc.
Developers claim speed improvement of 300-1000x
Dev's also claim seeing Varnish deliver 20GBPS on off the shelf hardware...
Claim that you will typically max out your internet connection before exhausting Varnish's ability to serve content from cache.
Mention some people have had problems under OSX.
Varnish looks for value in s-maxage or maxage in cache-control. If neither set looks for Expires header. Then looks in VCL. If nothing set then uses the default_ttl runtime option.
Can be overridden in VCL.
Varnish ignores request cache headers.
Will only cache:
200: OK
203: Non-Authoritative Information
300: Multiple Choices
301: Moved Permanently
302: Moved Temporarily
307: Temporary Redirect
410: Gone
404: Not Found
Mention that 32 bit installs of supported versions are possible but limited memory.
If your app runs on another OS there's nothing to stop you putting Varnish in front of it on a supported OS...
Lego analogy.
-a port Varnish listens on.
-f VCL file
-s type and size of storage
Mention that runtime options are passed to varnishd whent started, normally set in defaults file.
Mention that VCL allows you to decide which backend to use when a request is received.
Also mention Varnish supports several types of load balancing.
Mention that issuing Varnish reload simply reloads the config.
Server not stopped so cache not purged.
Existing items in cache will keep the existing cache time!
Reload does nothing if VCL invalid, which is good...
Mention no support for user variables or loops.
Note that you can't pass arguments to subroutines in VCL.
Only give an overview!!
Also mention pipe along with pass.
hash_data: adds a string to the hash input.
regsub: replaces first regex match with the sub
regsuball: replaces all regex matches with sub
ban: bans all objects in cache that match the expression.
ban_url: bans all objects in cache that match the regex. DEPRECATED.
Ban is a filter on objects in the cache. Ban things from being served from cache but doesn't stop new items entering the cache.
Mention that Varnish will set a ttl before this subroutine is called.
Note that this example is overly simplistic!
Varnish queues multiple requests for the same content.
Allows Varnish to stop requests for content piling up while fetching content from a backend.
To use graced content for unhealthy backends health checks must be set.
Configure req.grace in vcl_recv and beresp.grace in vcl_fetch.
req.grace can be set dynamically depending on the health of a backend.
Typically store an object for several hours past ttl.
Only use it for a few seconds past the ttl unless the backend is sick.
Configured with url, interval, window, threshold.
Interval is how often to probe.
Threshold and window set limits, eg. Threshold probes must pass in window probes.
Used to mark a single object on a single backend as sick for a period of time.
If n (default 10) objects are marked as sick whole backend will be marked as sick.
Can trigger grace mode.
Note that Varnish does not implement the complete ESI specification.