© All rights reserved. Zend Technologies, Inc . Zend Server – OSI Days Kevin Schroeder Technology Evangelist Zend Technologies
May 17, 2015
©All rights reserved. Zend Technologies, Inc.
Zend Server – OSI DaysKevin Schroeder
Technology Evangelist
Zend Technologies
©All rights reserved. Zend Technologies, Inc.
About me
• Kevin Schroeder Technology Evangelist for Zend
Programmer
Sys Admin
Author• IBM i Programmer’s Guide to PHP
• You want to do WHAT with PHP? – Coming up
Race Ferraris on the weekend• My Honda has a dismal win record
©All rights reserved. Zend Technologies, Inc.
I blog at eschrade.com
Follow us!
Zend Technologies
http://twitter.com/zend
http://twitter.com/kpschrade (me!)
©All rights reserved. Zend Technologies, Inc.
A quick note on Zendcon… BE THERE!!
•Learn PHP best practices•Discover new advances •Gain new insights•Deploy and scale large PHP applications•Explore new technologies like NoSQL and Cloud Computing•Learn how to effectively leverage Zend Framework and Zend Framework 2.0
©All rights reserved. Zend Technologies, Inc.
• Also, we’re doing a drawing for a copy of Zend Studio! I will be asking a question at the end, and the first person
to get it will win a free copy of Zend Studio
©All rights reserved. Zend Technologies, Inc.
What does Zend do
• Zend Framework
• Zend Studio (8.0 in public beta 1)
• Zend Server Monitoring,
Code tracing (freaking cool!!)
Job queuing
HA Session Clustering
• Zend Server Cluster Manager
• Lots and lots of training
• PHP, Zend Framework certifications
©All rights reserved. Zend Technologies, Inc.
Products
People
Process
Com
mu
nit
yZend Solutions: Increasing PHP Lifecycle Maturity
Zend Developer Solution Zend Production Server Solution
Develop Test Deploy Maintain
Zend Studio
Zend Framework
Platinum Support
Gold Support
Zend Platform Enterprise Suite(Dev License)
Zend Server (Dev License)
EnterpriseSupport
StandardSupport
Zend Platform Enterprise Suite
Zend ServerZend Framework
Zend Guard
©All rights reserved. Zend Technologies, Inc.
Linux(rpm/web repositories)
IBM i(PTF)
Windows(MSI)
ApplicationPerformance
Acceleration
Optimization
Caching
Reliability &Management
Monitoring
Root-Cause
Configuration
Scale-Out
Clustering
Job Queue
Downloads
Business-gradePHP
Hot Fixes
Support
Java Bridge
Zend Framework
PHP
Zend Server
Zen
d S
tudio
(Ecl
ipse
-base
d)
Colla
bora
teD
ebug
Pro
file
Test
Zend Server8
©All rights reserved. Zend Technologies, Inc.
What is Zend Server?
• What it is not A fork of PHP
A competitor of PHP
• What it is/has Full PHP compatibility (it’s built from the same source
code)
SLA-based support
Many additional features
©All rights reserved. Zend Technologies, Inc.Name of this section
Zend Server CE Zend Server
Native installation
Certified PHP
Zend Framework
Apache (or IIS integration)
MySQL (on Windows)
Built-in DB connectivity (Oracle, DB2, MySQL, …)
Web-based administrator console
Debugger interface
Bytecode acceleration
Caching API
Java connector
Page caching
Application monitoring (alerting)
Application problem diagnostics
Software updates and hot fixes
Technical support
Zend Server Editions
• Two versions Zend Server CE – FREE
Zend Server – Available with several additional features
| 10
©All rights reserved. Zend Technologies, Inc.
Supported Environments
• Red Hat/CentOS
• Ubuntu/Debian
• SLES/Novell (new)
• Windows
• IBM i
©All rights reserved. Zend Technologies, Inc.
How does Zend Server fit?
PHP
Zend Server
Your Application
©All rights reserved. Zend Technologies, Inc.
Where do the features fit?
Code Tracing
Monitoring
Job Queue
Optimizer+
Session Clusterin
g
Zend Server
©All rights reserved. Zend Technologies, Inc.
• The primary reason to use Zend Server is insight What went wrong?
Who did it happen to?
• But there are many useful features in Server 5
Code Tracing/Monitorin
gJob Queue Session
ClusteringNative
installation Zend Framework
Apache or IIS integration Java connector
Web-based administrator
console
Debugger interface
Bytecode acceleration
Caching API Page cachingZend Download Server (Linux
only)
Software updates and hot fixes Technical support
©All rights reserved. Zend Technologies, Inc.
Monitoring
©All rights reserved. Zend Technologies, Inc.
Why do we need diagnostic tools?
©All rights reserved. Zend Technologies, Inc.
Let’s slow that down a bit
©All rights reserved. Zend Technologies, Inc.
Fixing problems in a dev environment
©All rights reserved. Zend Technologies, Inc.
Fixing problems in production environments
Logging
Monitoring
©All rights reserved. Zend Technologies, Inc.
Code Tracing
©All rights reserved. Zend Technologies, Inc.
Code TracingReproducing an issue is not always possible...
▶ Dependency on specific SESSION state
▶ Dependency on specific database state
▶ “Replaying” the request is risky or impossible
Zend Code Tracing can capture the entire execution flow
▶ ...and, it is efficient enough to be used in most production environments!
“Hindsight is always twenty-twenty.”- Billy Wilder
©All rights reserved. Zend Technologies, Inc.
©All rights reserved. Zend Technologies, Inc.
©All rights reserved. Zend Technologies, Inc.
Job Queue
©All rights reserved. Zend Technologies, Inc.
Job Queue – A Common Execution Flow
©All rights reserved. Zend Technologies, Inc.
Why use the Job Queue
• Very easy to set up
• Very easy to use API
• Very easy to scale
• Job execution can be easily deployed as part of your application
©All rights reserved. Zend Technologies, Inc.
Not good for queuing
Typical anatomy of a PHP Application
PHP: Past and Present
| 27
Presentation
Application Control
Database Access
Business Logic
Presentation
Application Control
Business Logic
Presentation
©All rights reserved. Zend Technologies, Inc.
Anatomy of a Modern PHP Application
PHP: Past and Present
| 28
Presentation
Database Access
Business Logic
Application Control
Something.phtml
Something.phtml
Something.phtml
Something.phtml
Something.phtml
Something.phtml
Something.phtml
Something.phtml
Something.p
hp
Something.p
hp
Something.p
hp
Something.p
hp
Something.p
hp
Something.p
hp
Something.p
hp
Something.p
hp
Something.p
hp
Something.p
hp
Something.p
hp
Something.p
hp
Something.p
hp
Something.p
hp
Something.p
hp
Something.p
hp
Something.p
hp
Something.p
hp
Something.p
hp
Something.p
hp
Something.p
hp
Something.p
hp
Something.p
hp
Something.p
hp
Much better for queuing
©All rights reserved. Zend Technologies, Inc.
A useful practice:
• Create a generic handler
• Pass objects to be executed to that handler
©All rights reserved. Zend Technologies, Inc.
Session Clustering
©All rights reserved. Zend Technologies, Inc.31 the Simple Cloud API Initiative
Architectural Overview
©All rights reserved. Zend Technologies, Inc.32 the Simple Cloud API Initiative
Failure Handling
©All rights reserved. Zend Technologies, Inc.33 the Simple Cloud API Initiative
Scalability & Cloud Readiness
• Session Clustering provides a Graceful Shutdown mechanism When a machine is shut down, it will transfer all it’s
sessions to a different server in the cluster
All cluster members will know to use the replacement server while the original owner is down
This process rarely takes more than 30 seconds
• Graceful Shutdown allows shutting down machines permanently or for maintenance without losing sessions
• Allows scaling down in addition to scaling up – Cloud ready!
©All rights reserved. Zend Technologies, Inc.
Zend Server Cluster Manager
©All rights reserved. Zend Technologies, Inc.35 the Simple Cloud API Initiative
What is Zend Server Cluster Manager?
• A central management point for a cluster of Zend Servers
• Central Configuration Management
• Central Monitoring
• Session Clustering
©All rights reserved. Zend Technologies, Inc.
Wrapup
©All rights reserved. Zend Technologies, Inc.
Wrapup
Code Tracing/Monitorin
gJob Queue Session
ClusteringNative
installation Zend Framework
Apache or IIS integration Java connector
Web-based administrator
console
Debugger interface
Bytecode acceleration
Caching API Page cachingZend Download Server (Linux
only)
Software updates and hot fixes Technical support
©All rights reserved. Zend Technologies, Inc.
Question
• For a free copy of Zend Studio…
• Is it generally a good practice to use Zend Server Code Tracing in a production environment?
©All rights reserved. Zend Technologies, Inc.
Follow us!
Zend Technologies
http://twitter.com/zend
http://twitter.com/kpschrade (me!)
©All rights reserved. Zend Technologies, Inc.
Get this information and all the examples at eschrade.com…
©All rights reserved. Zend Technologies, Inc.
Remember… BE THERE!!
•Learn PHP best practices•Discover new advances •Gain new insights•Deploy and scale large PHP applications•Explore new technologies like NoSQL and Cloud Computing•Learn how to effectively leverage Zend Framework and Zend Framework 2.0