1 / 21

Running PHP on the Windows Azure Platform

Running PHP on the Windows Azure Platform. Brian Swan PHP Developer Advocate Microsoft brian.swan@microsoft.com @ brian_swan http://blogs.msdn.com/b/brian_swan http://blogs.msdn.com/b/silverlining. Lots I could talk about…. Why is PHP 5.3 faster on Windows than previous versions of PHP?

corine
Download Presentation

Running PHP on the Windows Azure Platform

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Running PHP on the Windows Azure Platform Brian Swan PHP Developer Advocate Microsoft brian.swan@microsoft.com@brian_swan http://blogs.msdn.com/b/brian_swan http://blogs.msdn.com/b/silverlining

  2. Lots I could talk about… • Why is PHP 5.3 faster on Windows than previous versions of PHP? • Version 3.0 (beta) of the SQL Server Driver for PHP is available. • SQL Server ODBC driver for Linux is coming. • Hadoop for Windows Server/Azure is coming.

  3. But I’ll tour Windows Azure(by looking at auto-scaling)

  4. Windows Azure Platform Overview • Developer Experience • Use existing skills and tools. AppFabric Management Relational data Management Compute Storage Connectivity Access control ON-PREMISES LOB Applications Composite applications

  5. What type of cloud is Windows Azure? Infrastructure (as a Service) Platform (as a Service) Packaged Software Software (as a Service) Applications Applications Applications Applications You manage Data Data Data Data You manage Runtime Runtime Runtime Runtime Managed by vendor Middleware Middleware Middleware Middleware Managed by vendor You manage O/S O/S O/S O/S Virtualization Virtualization Virtualization Virtualization Managed by vendor Servers Servers Servers Servers Storage Storage Storage Storage Networking Networking Networking Networking

  6. What are Web and Worker roles? In general, think of a “role” as on OS template. • Worker Role • Internal Facing • TCP/HTTP Endpoint • Long running processes • (Think Service or Deamon) • Web Role • External Facing • HTTP/HTTPS Endpoint • Short lived calls • (Think Web Server) • There is also a VM Role • You configure and maintain the OS. • Lacks persistent state.

  7. Instance Sizes and Costs

  8. What is Azure Storage? Tables: simply (and loosely) structured data(not relational) Blobs: large, unstructured binary data (audio, video, etc.) Queues: serially accessed messages • Storage Costs $0.14 GB/month* $0.01/10k transactions Don’t forget • Transfer Costs $0.15 GB outbound * http://blogs.msdn.com/b/windowsazure/archive/2011/10/27/microsoft-lowers-storage-cost-for-blob-and-table-storage-in-windows-azure.aspx

  9. Azure Table Storage Query Performance

  10. Account Container • Blob Azure Blob Storage http://<account>.blob.core.windows.net/<container>/<blobname> • PIC01.JPG • images PIC02.JPG • mymedia VID01.AVI • videos

  11. Containers and Blobs • Containers • Multiple containers per account • Create/destroy on the fly • One container can hold up to 100 TB* worth of blobs • Set access policies (private, public read, full public read) • Set metadata • No search/query (i.e. no WHERE MetadataValue = ?) • Blobs • A blob can be up to 1 TB in size • Set access policy • Set metadata *100 TB is the size limit for an entire storage account

  12. What is the Diagnostics Monitor? An Azure component (MonAgentHost.exe) that collects diagnostic data for application instances • Starts automatically by default • Must define a storage account connection string

  13. How does it work (in a nutshell)? Role Instance • Role Instance Starts • Diagnostic Monitor Starts • Monitor is configured • Imperatively at Start time • Remotely any time • Monitor buffers data locally • User can set a quota (FIFO) • User initiates transfer to storage • Scheduled or On Demand Role Local directory storage Diagnostic Monitor Windows Azure Storage

  14. Diagnostic Data Sources

  15. What is the Management API? • A REST API that allows you to manage services under an Azure subscription. • Examples include… • Create/stop/start/delete a deployment • Move staging deployment to production • Increasing the number of instances • Initiate a rolling upgrade • Etc. • (almost anything you can do via the management portal) • All API calls must be signed with an X509 certificate

  16. Windows Azure SDK for PHP • http://phpazure.codeplex.com/ • Open Source project • Mostly platform independent (only the packaging tools have a Windows dependency) • Features • PHP classes for Windows Azure Blobs, Tables & Queues • Scaffolds for quick application deployment • Helper Classes for HTTP transport, AuthN/AuthZ, REST & Error Management • Manageability, Instrumentation & Logging support • Support for storing PHP sessions in Azure Table Storage • Management API client • Diagnostics client • Command line tools set for packaging, management , diagnostics, and deployment

  17. Demo Auto-scaling a Windows Azure/PHP application Windows Azure SDK for PHP + …

  18. Code • GolferMessageBoard code is on the TechNet Wiki: http://social.technet.microsoft.com/wiki/contents/articles/use-the-windows-azure-web-role-and-windows-azure-blob-service-with-php.aspx • Auto-scaling code is on GitHub: https://github.com/brian-swan/PHP-Auto-Scaler • Read about it here: http://blogs.msdn.com/b/silverlining/archive/2011/10/05/an-auto-scaling-module-for-php-applications-in-windows-azure.aspx

  19. Other Resources • http://blogs.msdn.com/b/silverlining • A PHP on Windows Azure Learning Plan • http://blogs.msdn.com/b/brian_swan • https://github.com/brian-swan • http://azurephp.interoperabilitybridges.com/ • Why is PHP 5.3 faster on Windows than previous versions of PHP? • Version 3.0 (beta) of the SQL Server Driver for PHP is available. • SQL Server ODBC driver for Linux is coming. • Hadoop for Windows Server/Azure is coming.

  20. Try It Out http://www.microsoft.com/windowsazure/free-trial/

  21. Q & A?

More Related