SlideShare una empresa de Scribd logo
1 de 15
Descargar para leer sin conexión
Django em Sites de Alto Tráfego


        O Case UCSvirtual

          Jeronimo Zucco ­ jczucco@ucs.br
           Leandro Zanuz ­ lzanuz@ucs.br
                                            Pycon Brasil 2008
Quem somos


    Jeronimo Zucco:  Analista  de  Suporte  da  Universidade 
      de Caxias do Sul, bacharel em Ciência da Computação e 
      especialista  em  Gerência  e  Segurança  de  Redes  de 
      Computadores,  certificado  Linux  Professional  Institute. 
      Atua com Linux e servidores web desde 1998.

    Leandro Zanuz: Desenvolvedor de aplicações Web com 
      Django,  Plone,  Zope,  Python  na  Universidade  de  Caxias 
      do Sul, tecnólogo em Processamento de Dados, cursando 
      MBA em Gestão de TI. Programador web desde 1998.

                                                          Pycon Brasil 2008
Números da UCS

    ●   14 unidades de ensino (Interior do RS ­ Região 
        Nordeste e Vale do Caí)
    ●   37.021 alunos 
            [ Graduação, pós­graduação, ensino técnico e 
              profissionalizante, ensino médio e extensão. ]
    ●   1.371 professores
    ●   1.845 funcionários 
    ●   5.000 computadores
                                                               Pycon Brasil 2008
UCS & Python


    ●   Utiliza Python/Zope desde 2001
    ●   Vários portais desenvolvidos em Plone
    ●   Adoção do Django em Janeiro/2007
    ●   Python é adotado na maior parte dos projetos
    ●   Equipe de desenvolvimento Python: 8 pessoas
    ●   Apoio instituicional no uso de software livre

                                                   Pycon Brasil 2008
O Portal UCSvirtual

    ●   Portal de todos os serviços on­line da UCS;
    ●   Serviços da Graduação, Pós­Graduação, 
        Pesquisa, Recursos Humanos, Gestão 
        Administrativa e Gestão do Portal;
    ●   Alguns serviços:
        –   Matrícula on­line;
        –   Histórico escolar;
        –   Biblioteca;
 
        –   Ambiente Virtual de Aprendizagem.    Pycon Brasil 2008
Tecnologias Empregadas

    ●   Django                 ●   LVS
    ●   Apache + SSL               –   Heartbeat
        –   Mod_Expires            –   Ldirectord
        –   Mod_Deflate        ●   Oracle
        –   Mod_Python         ●   OpenLDAP
        –   ModSecurity        ●   Nagios
    ●   Squid                  ●   Bacula
    ●   Single Sign­on (SSO)
                                                    Pycon Brasil 2008
Arquitetura




                  Pycon Brasil 2008
Proxy Reverso




­ Fail Over: IP Virtual passa ao Proxy 2
­ Fail Back: IP Virtual volta ao Proxy 1
­ Normal: IP Virtual no Proxy 1 e balanceamento 
                                                   Pycon Brasil 2008

de carga via LVS RR
Squid com cache_peer

    ●   LB e HA usando cache_peer:
        cache_peer 10.10.10.1 parent 80 0 no­query  
          originserver no­digest round­robin name=django1
        cache_peer 10.10.10.2 parent 80 0 no­query  
          originserver no­digest round­robin name=django2
        acl site1 dstdomain site1.dominio.com
        cache_peer_access django1 allow site1
        cache_peer_access django2 allow site1
        cache_peer_access django1 deny all
                                                     Pycon Brasil 2008
 
        cache_peer_access django2 deny all
Squid




            Pycon Brasil 2008
Apache

    ●   mod_deflate
        SetOutputFilter DEFLATE
        SetEnvIfNoCase Request_URI .(?:exe|t?gz|zip|bz2|sit|
         rar|pdf|swf|gif|jpe?g|png)$ no­gzip dont­vary
    ●   mod_expires
        ExpiresActive On
        ExpiresByType image/png quot;now plus 3 dayquot;
        ExpiresByType text/css quot;now plus 2 day
    ●   mod_security
                                                        Pycon Brasil 2008
Customizações Django

    ●   Sessão compartilhada;
    ●   Backend de autenticação;
        –    (AUTHENTICATION_BACKENDS)
    ●   SSO ­ Single sign­on.
        –    (SECRET_KEY e SESSION_COOKIE_DOMAIN)




                                             Pycon Brasil 2008
Próximos Passos
    ●   Squid → Pound + Varnish
    ●   Apache → Nginx
        –   Nginx (Engine X);
        –   http://nginx.net
        –   04/2008: 1,018,503  ­  09/2008: 2,562,554 (netcraft)
    ●   mod_python → mod_wsgi
        –   Escrito completamente em C#
        –   Mais rápido, menor uso de memória, seguro

 
        –   http://code.google.com/p/modwsgi/           Pycon Brasil 2008
Próximos Passos

    ●   StaticGenerator for Django
        –   Páginas estáticas ou pouco dinâmicas.
        –   (quem somos, produtos, blogs, notícias, etc.)
        –   http://superjared.com/projects/static­generator/




                                                            Pycon Brasil 2008
Perguntas ?




    Jeronimo Zucco: jczucco@ucs.br

    Leandro Zanuz: lzanuz@ucs.br




                                     Pycon Brasil 2008

Más contenido relacionado

Destacado

Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)contently
 
How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024Albert Qian
 
Social Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsSocial Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsKurio // The Social Media Age(ncy)
 
Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Search Engine Journal
 
5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summarySpeakerHub
 
ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd Clark Boyd
 
Getting into the tech field. what next
Getting into the tech field. what next Getting into the tech field. what next
Getting into the tech field. what next Tessa Mero
 
Google's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentGoogle's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentLily Ray
 
Time Management & Productivity - Best Practices
Time Management & Productivity -  Best PracticesTime Management & Productivity -  Best Practices
Time Management & Productivity - Best PracticesVit Horky
 
The six step guide to practical project management
The six step guide to practical project managementThe six step guide to practical project management
The six step guide to practical project managementMindGenius
 
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...RachelPearson36
 
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...Applitools
 
12 Ways to Increase Your Influence at Work
12 Ways to Increase Your Influence at Work12 Ways to Increase Your Influence at Work
12 Ways to Increase Your Influence at WorkGetSmarter
 
Ride the Storm: Navigating Through Unstable Periods / Katerina Rudko (Belka G...
Ride the Storm: Navigating Through Unstable Periods / Katerina Rudko (Belka G...Ride the Storm: Navigating Through Unstable Periods / Katerina Rudko (Belka G...
Ride the Storm: Navigating Through Unstable Periods / Katerina Rudko (Belka G...DevGAMM Conference
 
Barbie - Brand Strategy Presentation
Barbie - Brand Strategy PresentationBarbie - Brand Strategy Presentation
Barbie - Brand Strategy PresentationErica Santiago
 
Good Stuff Happens in 1:1 Meetings: Why you need them and how to do them well
Good Stuff Happens in 1:1 Meetings: Why you need them and how to do them wellGood Stuff Happens in 1:1 Meetings: Why you need them and how to do them well
Good Stuff Happens in 1:1 Meetings: Why you need them and how to do them wellSaba Software
 

Destacado (20)

Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)
 
How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024
 
Social Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsSocial Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie Insights
 
Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024
 
5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary
 
ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd
 
Getting into the tech field. what next
Getting into the tech field. what next Getting into the tech field. what next
Getting into the tech field. what next
 
Google's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentGoogle's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search Intent
 
How to have difficult conversations
How to have difficult conversations How to have difficult conversations
How to have difficult conversations
 
Introduction to Data Science
Introduction to Data ScienceIntroduction to Data Science
Introduction to Data Science
 
Time Management & Productivity - Best Practices
Time Management & Productivity -  Best PracticesTime Management & Productivity -  Best Practices
Time Management & Productivity - Best Practices
 
The six step guide to practical project management
The six step guide to practical project managementThe six step guide to practical project management
The six step guide to practical project management
 
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
 
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
 
12 Ways to Increase Your Influence at Work
12 Ways to Increase Your Influence at Work12 Ways to Increase Your Influence at Work
12 Ways to Increase Your Influence at Work
 
ChatGPT webinar slides
ChatGPT webinar slidesChatGPT webinar slides
ChatGPT webinar slides
 
More than Just Lines on a Map: Best Practices for U.S Bike Routes
More than Just Lines on a Map: Best Practices for U.S Bike RoutesMore than Just Lines on a Map: Best Practices for U.S Bike Routes
More than Just Lines on a Map: Best Practices for U.S Bike Routes
 
Ride the Storm: Navigating Through Unstable Periods / Katerina Rudko (Belka G...
Ride the Storm: Navigating Through Unstable Periods / Katerina Rudko (Belka G...Ride the Storm: Navigating Through Unstable Periods / Katerina Rudko (Belka G...
Ride the Storm: Navigating Through Unstable Periods / Katerina Rudko (Belka G...
 
Barbie - Brand Strategy Presentation
Barbie - Brand Strategy PresentationBarbie - Brand Strategy Presentation
Barbie - Brand Strategy Presentation
 
Good Stuff Happens in 1:1 Meetings: Why you need them and how to do them well
Good Stuff Happens in 1:1 Meetings: Why you need them and how to do them wellGood Stuff Happens in 1:1 Meetings: Why you need them and how to do them well
Good Stuff Happens in 1:1 Meetings: Why you need them and how to do them well
 

Django em Sites de Alto Tráfego - O Case UCSvirtual

  • 1. Django em Sites de Alto Tráfego O Case UCSvirtual Jeronimo Zucco ­ jczucco@ucs.br Leandro Zanuz ­ lzanuz@ucs.br   Pycon Brasil 2008
  • 2. Quem somos Jeronimo Zucco:  Analista  de  Suporte  da  Universidade  de Caxias do Sul, bacharel em Ciência da Computação e  especialista  em  Gerência  e  Segurança  de  Redes  de  Computadores,  certificado  Linux  Professional  Institute.  Atua com Linux e servidores web desde 1998. Leandro Zanuz: Desenvolvedor de aplicações Web com  Django,  Plone,  Zope,  Python  na  Universidade  de  Caxias  do Sul, tecnólogo em Processamento de Dados, cursando  MBA em Gestão de TI. Programador web desde 1998.   Pycon Brasil 2008
  • 3. Números da UCS ● 14 unidades de ensino (Interior do RS ­ Região  Nordeste e Vale do Caí) ● 37.021 alunos  [ Graduação, pós­graduação, ensino técnico e  profissionalizante, ensino médio e extensão. ] ● 1.371 professores ● 1.845 funcionários  ● 5.000 computadores   Pycon Brasil 2008
  • 4. UCS & Python ● Utiliza Python/Zope desde 2001 ● Vários portais desenvolvidos em Plone ● Adoção do Django em Janeiro/2007 ● Python é adotado na maior parte dos projetos ● Equipe de desenvolvimento Python: 8 pessoas ● Apoio instituicional no uso de software livre   Pycon Brasil 2008
  • 5. O Portal UCSvirtual ● Portal de todos os serviços on­line da UCS; ● Serviços da Graduação, Pós­Graduação,  Pesquisa, Recursos Humanos, Gestão  Administrativa e Gestão do Portal; ● Alguns serviços: – Matrícula on­line; – Histórico escolar; – Biblioteca;   – Ambiente Virtual de Aprendizagem. Pycon Brasil 2008
  • 6. Tecnologias Empregadas ● Django ● LVS ● Apache + SSL – Heartbeat – Mod_Expires – Ldirectord – Mod_Deflate ● Oracle – Mod_Python ● OpenLDAP – ModSecurity ● Nagios ● Squid ● Bacula ● Single Sign­on (SSO)   Pycon Brasil 2008
  • 7. Arquitetura   Pycon Brasil 2008
  • 9. Squid com cache_peer ● LB e HA usando cache_peer: cache_peer 10.10.10.1 parent 80 0 no­query   originserver no­digest round­robin name=django1 cache_peer 10.10.10.2 parent 80 0 no­query   originserver no­digest round­robin name=django2 acl site1 dstdomain site1.dominio.com cache_peer_access django1 allow site1 cache_peer_access django2 allow site1 cache_peer_access django1 deny all Pycon Brasil 2008   cache_peer_access django2 deny all
  • 10. Squid   Pycon Brasil 2008
  • 11. Apache ● mod_deflate SetOutputFilter DEFLATE SetEnvIfNoCase Request_URI .(?:exe|t?gz|zip|bz2|sit| rar|pdf|swf|gif|jpe?g|png)$ no­gzip dont­vary ● mod_expires ExpiresActive On ExpiresByType image/png quot;now plus 3 dayquot; ExpiresByType text/css quot;now plus 2 day ● mod_security   Pycon Brasil 2008
  • 12. Customizações Django ● Sessão compartilhada; ● Backend de autenticação; –  (AUTHENTICATION_BACKENDS) ● SSO ­ Single sign­on. –  (SECRET_KEY e SESSION_COOKIE_DOMAIN)   Pycon Brasil 2008
  • 13. Próximos Passos ● Squid → Pound + Varnish ● Apache → Nginx – Nginx (Engine X); – http://nginx.net – 04/2008: 1,018,503  ­  09/2008: 2,562,554 (netcraft) ● mod_python → mod_wsgi – Escrito completamente em C# – Mais rápido, menor uso de memória, seguro   – http://code.google.com/p/modwsgi/ Pycon Brasil 2008
  • 14. Próximos Passos ● StaticGenerator for Django – Páginas estáticas ou pouco dinâmicas. – (quem somos, produtos, blogs, notícias, etc.) – http://superjared.com/projects/static­generator/   Pycon Brasil 2008
  • 15. Perguntas ? Jeronimo Zucco: jczucco@ucs.br Leandro Zanuz: lzanuz@ucs.br   Pycon Brasil 2008