Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.

Técnicas para ser escalável com PHP

2,580 views

Published on

Lightning talk falando muito superficialmente sobre escalabilidade, tentando prover o básico de informação para melhorar a escalabilidade e performance dos sistemas escritos com PHP.
Falando desde

Published in: Technology
  • DOWNLOAD THAT BOOKS INTO AVAILABLE FORMAT (2019 Update) ......................................................................................................................... ......................................................................................................................... Download Full PDF EBOOK here { http://shorturl.at/mzUV6 } ......................................................................................................................... Download Full EPUB Ebook here { http://shorturl.at/mzUV6 } ......................................................................................................................... Download Full doc Ebook here { http://shorturl.at/mzUV6 } ......................................................................................................................... Download PDF EBOOK here { http://shorturl.at/mzUV6 } ......................................................................................................................... Download EPUB Ebook here { http://shorturl.at/mzUV6 } ......................................................................................................................... Download doc Ebook here { http://shorturl.at/mzUV6 } ......................................................................................................................... ......................................................................................................................... ................................................................................................................................... eBook is an electronic version of a traditional print book that can be read by using a personal computer or by using an eBook reader. (An eBook reader can be a software application for use on a computer such as Microsoft's free Reader application, or a book-sized computer that is used solely as a reading device such as Nuvomedia's Rocket eBook.) Users can purchase an eBook on diskette or CD, but the most popular method of getting an eBook is to purchase a downloadable file of the eBook (or other reading material) from a Web site (such as Barnes and Noble) to be read from the user's computer or reading device. Generally, an eBook can be downloaded in five minutes or less ......................................................................................................................... .............. Browse by Genre Available eBooks .............................................................................................................................. Art, Biography, Business, Chick Lit, Children's, Christian, Classics, Comics, Contemporary, Cookbooks, Manga, Memoir, Music, Mystery, Non Fiction, Paranormal, Philosophy, Poetry, Psychology, Religion, Romance, Science, Science Fiction, Self Help, Suspense, Spirituality, Sports, Thriller, Travel, Young Adult, Crime, Ebooks, Fantasy, Fiction, Graphic Novels, Historical Fiction, History, Horror, Humor And Comedy, ......................................................................................................................... ......................................................................................................................... .....BEST SELLER FOR EBOOK RECOMMEND............................................................. ......................................................................................................................... Blowout: Corrupted Democracy, Rogue State Russia, and the Richest, Most Destructive Industry on Earth,-- The Ride of a Lifetime: Lessons Learned from 15 Years as CEO of the Walt Disney Company,-- Call Sign Chaos: Learning to Lead,-- StrengthsFinder 2.0,-- Stillness Is the Key,-- She Said: Breaking the Sexual Harassment Story That Helped Ignite a Movement,-- Atomic Habits: An Easy & Proven Way to Build Good Habits & Break Bad Ones,-- Everything Is Figureoutable,-- What It Takes: Lessons in the Pursuit of Excellence,-- Rich Dad Poor Dad: What the Rich Teach Their Kids About Money That the Poor and Middle Class Do Not!,-- The Total Money Makeover: Classic Edition: A Proven Plan for Financial Fitness,-- Shut Up and Listen!: Hard Business Truths that Will Help You Succeed, ......................................................................................................................... .........................................................................................................................
       Reply 
    Are you sure you want to  Yes  No
    Your message goes here

Técnicas para ser escalável com PHP

  1. 1. Técnicas para ser escalável com PHPPHPn Rio 2011  Quem?  Nome: Filipe La Ruina  Empresa: Cortex Intelligence  Desenvolvedor Web a um bom tempo  Serviços web escaláveis  Bolsa de Mulher  Novo Serviço no futuro ;)  Com uma paixão por desenvolvimento de jogos
  2. 2. Técnicas para ser escalável com PHPPHPn Rio 2011  O que é Escalabilidade?  Não é performance (mas ela afeta)  Manter a performance  Escalável = Aguenta aumento de tráfego
  3. 3. Técnicas para ser escalável com PHPPHPn Rio 2011  Comofas?  Verticalmente (mais forte)  Compre servidores mais fortes  Mais rápido de fazer  Mais caro  Horizontalmente (maior quantidade) vamos falar desse :)  Mais servidores  Mais difícil (arquitetura tem que acompanhar)  Mais barato (bem mais a longo prazo)
  4. 4. Técnicas para ser escalável com PHPPHPn Rio 2011  Servidor  Use PHP 5.3 (e 5.4 quando sair)  Arquitetura ”separada”  Cache  APC (http://br.php.net/apc)  Memcache (http://br2.php.net/memcache)  Faça filas  Gearman (http://br2.php.net/gearman)  Perfeito para atividades não-síncronas
  5. 5. Técnicas para ser escalável com PHPPHPn Rio 2011  Arquitetura  Banco  Master Slave  Read/Write entre 80/20 – 90/10 %  Load balancer  Hardware  Mais caro  Mais rápido  Software  Barato  Perlbal  Apache mod_proxy  ...
  6. 6. Técnicas para ser escalável com PHPPHPn Rio 2011  Arquitetura  Servidores de Memcache  Armazena Sessões  Armazena resultados de queries  Servidores de Gearman  Armazena seus Jobs
  7. 7. Técnicas para ser escalável com PHPPHPn Rio 2011  Cliente  HTTP Cache  Menos Requests  Cabeçalhos de Cache  Cache-Control: max-age  Expires  Etag  Javascript e CSS  Minify  Gzip  Otimizações  Servidor de arquivos estáticos
  8. 8. Técnicas para ser escalável com PHPPHPn Rio 2011  Dicas Gerais  Evite acesso a disco  Faça cache de memória  Meça onde está seu gargalo  Cache x1000  Ative o APC
  9. 9. Técnicas para ser escalável com PHPPHPn Rio 2011  Ferramentas  Google PageSpeed  Firebug  Yahoo YSlow  Xdebug (profiling)  HipHop para análise estática (http://talks.php.net/show/latinoware/18)
  10. 10. Técnicas para ser escalável com PHPPHPn Rio 2011  Links  http://code.google.com/speed/articles/  http://highscalability.com/  http://duartes.org/gustavo/blog/post/what-your- computer-does-while-you-wait  http://www.slideshare.net/techdude/scalable-web- architectures-common-patterns-and-approaches
  11. 11. Técnicas para ser escalável com PHPPHPn Rio 2011 Obrigado! @filipelaruina filaruina@gmail.com

×