Seenthis
•
 
Identifiants personnels
  • [mot de passe oublié ?]

 
  • #h
  • #ht
  • #http
RSS: #http/2

#http/2

  • #http/2.0
  • @b_b
    b_b @b_b PUBLIC DOMAIN 1/05/2019
    3
    @kent1
    @tofulm
    @cy_altern
    3

    How to enable #HTTP/2 support in #Apache

    Starting from Apache 2.4.27, the Apache MPM (Multi-Processing Module) prefork no longer supports HTTP/2.To fix this, select a different MPM: event or worker. We highly recommend you to use the event prefork.
    If you are using PHP, it is likely that PHP is integrated to Apache via the mod_php module, which requires the prefork MPM. If you switch out from preform MPM, you will need to use PHP as FastCGI. To switch to php-fpm, you can do as folllwing.

    ▻https://http2.pro/doc/Apache#prefork-http2
    ▻https://httpd.apache.org/docs/2.4/fr/howto/http2.html#mpm-config

    Sur debian stretch ça donne ça (si on avait activé mpm_prefork alors que mpm_event est bien celui proposé par défaut) :

    apt install php-fpm
    a2enmod proxy_fcgi setenvif
    a2enconf php7.0-fpm
    a2dismod php7.0
    a2dismod mpm_prefork
    a2enmod mpm_event
    service apache2 restart
    apt purge libapache2-mod-php
    a2enmod http2

    #http2 #mpm_event #php-fpm

    • #PHP
    • #PHP
    b_b @b_b PUBLIC DOMAIN
    • @cy_altern
      cy_altern @cy_altern CC BY-SA 2/05/2019

      #apache #php

      cy_altern @cy_altern CC BY-SA
    • @b_b
      b_b @b_b PUBLIC DOMAIN 2/05/2019

      Dans la foulée, deux liens à propos de l’optimisation de #php-fpm :

      Apache2 and php fpm performance optimization — Step-by-step guide

      ▻https://medium.com/@sbuckpesch/apache2-and-php-fpm-performance-optimization-step-by-step-guide-1bfecf161534

      If you consistently see a large number of idle workers, you may want to lower your MinSpareServers (for the prefork MPM) or MinSpareThreads (for the worker and event MPMs) setting so that you are not sustaining a higher number of processes or threads than necessary to process your rate of traffic. Maintaining more processes or threads than you actually need will unncessarily exhaust system resources.

      ▻https://www.datadoghq.com/blog/monitoring-apache-web-server-performance

      b_b @b_b PUBLIC DOMAIN
    • @b_b
      b_b @b_b PUBLIC DOMAIN 2/05/2019

      Toujours à propos de #php-fpm, et de l’intérêt de basculer le process manager de dynamic (valeur par défaut) vers autre ondemand ou static.

      Certaines personnes recommandent d’utiliser ondemand pour ne pas avoir de process php en idle quand il n’y a pas de trafic :

      Dans mon cas j’ai 10 processus qui tournent en permanence, même si aucun de mes sites n’est visité.

      ▻https://www.guillaume-leduc.fr/une-autre-facon-dutiliser-php-fpm.html

      If you’re working on a high performance PHP setup, the ’ondemand’ PM may not be for you. In that case, it’s wise to pre-fork your PHP-FPM processes up to the maximum your server can handle. That way, all your processes are ready to serve your requests without needing to be spawned first. However, for 90% of the sites out there, the ondemand PHP-FPM configuration is better than either static or dynamic.

      ▻https://community.webcore.cloud/tutorials/php_fpm_ondemand_process_manager_vs_dynamic

      Mais comme indiqué ci-dessus, ça n’est pas forcément mieux car le process manager va devoir spawner des process alors que des process en idle permettent une réaction plus rapide en cas de pic de trafic :

      Idle process stay online waiting for traffic spikes and responding immediately, rather than having to wait on the pm to spawn children and then kill them off after x pm.process_idle_timeout expires...

      The common advice is to use pm ondemand, as is the advice in this same support thread. However, that’s even worse, because ondemand will shutdown idle processes right down to 0 when there’s little to no traffic and then you’ll end up with just as much overhead issues as traffic fluctuates.

      ▻https://haydenjames.io/php-fpm-tuning-using-pm-static-max-performance

      Mais...

      PM dynamic and especially ondemand can be save you however, when you have multiple PHP-FPM pools. For example, hosting multiple cPanel accounts or multiple websites under different pools. I have a server for example with 100+ cpanel accounts and about 200+ domains and it would be impossible for pm.static or even dynamic to perform well. Only ondemand performs well since more than two third’s of the websites receive little to no traffic and with ondemand it means all children will be shutdown saving tons of server memory!

      When it comes to PHP-FPM, once you start to serve serious traffic, ondemand and dynamic process managers for PHP-FPM can limit throughput because of the inherent overhead. Know your system and set your PHP-FPM processes to match your server’s max capacity. Start with pm.max_children set based on max usage of pm dynamic or ondemand and then increase to the point where memory and CPU can process without becoming overwhelmed. You will notice that with pm static, because you keep everything sitting in memory, traffic spikes over time cause less spikes to CPU and your server’s load and CPU averages will be smoother. The average size of your PHP-FPM process will vary per web server requiring manual tuning, thus why the more automated overhead process managers – dynamic and ondemand – are more popular recommendations.

      Grosso merdo, il semble que dynamic peut faire le job quand on ne veut pas trop se prendre la tête, ondemand quand on sait à quoi s’attendre et qu’on est juste en mémoire (ou pour du dev), et static quand on veut faire du tuning précis.

      Un bon résumé :

      In dynamic type, the number of child processes is set dynamically based on the PHP-FPM parameters in conf file. But it is a bit memory-intensive type.

      In static type, the number of child processes is fixed by pm.max_children parameter, but this type is not flexible for a server with changing web traffic. It also consumes too much memory.

      In ondemand type, the PHP-FPM processes are spawned only on demand, based on the traffic. This type helps to manage varying traffic in memory restrained servers. But the overhead increases when there is so much traffic fluctuation.

      ▻https://bobcares.com/blog/php-fpm-tuning-high-load

      Bref, comme souvent il n’y a pas de recette unique/magique :p

      Et vous les gens, vous utilisez quoi ?

      b_b @b_b PUBLIC DOMAIN
    • @cy_altern
      cy_altern @cy_altern CC BY-SA 2/05/2019

      merci pour la sélection :)

      Sur la question ThreadPerChild vs ServerLimit : ▻https://www.liquidweb.com/kb/apache-performance-tuning-mpm-directives
      La doc apache : ▻http://httpd.apache.org/docs/2.4/mod/mpm_common.html#threadsperchild et ▻http://httpd.apache.org/docs/current/mod/mpm_common.html#maxrequestworkers
      (NB : ThreadPerChild ne peut être supérieur à ThreadLimit)

      Pour la configuration de Munin spécifique FPM + logs des requêtes lentes : ▻https://www.malekal.com/optimiser-php-fpm

      #ThreadPerChild #ServerLimit

      cy_altern @cy_altern CC BY-SA
    • @tofulm
      tofulm @tofulm 16/03/2021

      https://community.webcore.cloud/tutorials/how_to_solve_php_fpm_server_reached_max_children

      pour le calcul du max_children
      #max_children

      tofulm @tofulm
    • @b_b
      b_b @b_b PUBLIC DOMAIN 8/03/2022

      Et si on obtient l’erreur [proxy_fcgi:error] The timeout specified has expired ça n’est pas sur la conf PHP max_execution_time qu’il faut jouer, mais sur ProxyTimeout au niveau de la conf apache cf ▻http://wiki.centos-webpanel.com/apache-proxy-timeout-with-php-fpm & ▻https://www.theshell.guru/proxy_fcgierror-the-timeout-specified-has-expired-apache-2-4

      b_b @b_b PUBLIC DOMAIN
    Écrire un commentaire
  • @cy_altern
    cy_altern @cy_altern CC BY-SA 4/10/2018

    HTTP/2 n’est pas le futur. C’est le présent. | Blog Eleven Labs
    ▻https://blog.eleven-labs.com/fr/http2-nest-pas-le-futur-cest-le-present

    Une introduction à HTTP/2
    En complément : la doc de mod_http2 d’Apache : ▻https://httpd.apache.org/docs/2.4/mod/mod_http2.html

    #http/2

    cy_altern @cy_altern CC BY-SA
    Écrire un commentaire
  • @fil
    Fil @fil 28/09/2016
    4
    @kent1
    @ben
    @severo
    @renyonparis
    4

    How to get started with #Varnish Cache 5.0 with experimental #HTTP/2 support
    ▻https://info.varnish-software.com/blog/varnish-cache-5-http2-support

    https://cdn2.hubspot.net/hubfs/209523/4523035190_c5a6607609_b.jpg

    Varnish Cache 5.0 is now available. In Varnish Cache 5.0 there is experimental support for HTTP/2. By “experimental” we mean that it works, but we haven’t had any big production sites on it yet. We are eager for you to use it, test it and get your hands dirty with it and to get your input.
     
    Here is how you enable it: 
     
    1) Install Varnish Cache 5.0.0.
    2) Install #Hitch TLS proxy (www.hitch-tls.org) with ALPN support for terminating client TLS.
    3) Configure ALPN, PROXYv2 and finally HTTP/2!

    • #http
    Fil @fil
    • @severo
      severo @severo PUBLIC DOMAIN 11/10/2016

      Basé sur

      ▻http://www.hitch-tls.org

      severo @severo PUBLIC DOMAIN
    Écrire un commentaire
  • @bloginfo
    bloginfo @bloginfo CC BY-NC-ND 14/04/2016

    #Apache : utiliser le protocole HTTP/2
    ▻http://www.dsfc.net/logiciel-libre/apache-logiciel-libre/apache-protocole-http-2

    http://www.dsfc.net/wp-content/uploads/2016/04/http-2-test-keycdn.jpg

    L’activation du protocole HTTP/2, à partir de la version 2.4.17 du logiciel Apache, est un jeu d’enfant sous #Linux.

    #Centos #Fedora #Fedora_23 #Formateur_Apache #Formateur_Centos #Formateur_Fedora #Formateur_LAMP #Formateur_Linux #HTTP/2

    bloginfo @bloginfo CC BY-NC-ND
    Écrire un commentaire
  • @monolecte
    M😷N😷LECTE 🤬 @monolecte CC BY-NC-SA 9/03/2015

    3 choses à savoir sur #HTTP/2
    ▻http://www.webmarketing-com.com/2015/03/09/36071-3-choses-savoir-sur-http2
    Je suppose que les #geeks de #seenthis vont nous éclairer sur l’arrivée de ce #protocole.

    http://www.webmarketing-com.com/wp-content/uploads/2015/02/shutterstock_187078499.jpg

    C’est la grande nouvelle du mois : l’IETF (Internet Engineering Task Force) a annoncé le 18 février dernier avoir arrêté les spécifications finales de HTTP/2. Cette annonce met fin à 3 ans de réflexion. Mais quelles différences entre HTTP 1.1 et HTTP/2 ? Et comment démarrer la transition vers ce nouveau protocole ?

    M😷N😷LECTE 🤬 @monolecte CC BY-NC-SA
    Écrire un commentaire
  • @archiloque
    Archiloque @archiloque CC BY 27/02/2015

    grpc.io: un framework #RPC multi-language au dessus de #HTTP/2
    ▻http://www.grpc.io

    • #http
    Archiloque @archiloque CC BY
    Écrire un commentaire
  • @erratic
    schrödinger @erratic 18/02/2015

    Hypertext Transfer Protocol version 2 #HTTP/2
    ▻https://tools.ietf.org/html/draft-ietf-httpbis-http2

    Après 16 ans de HTTP/1.1, voici le HTTP/2 qui recevra le statut d’RFC IETF. Il devrait entre autre accélérer le chargement de pages HTML, ceci en multiplexant différents requêtes http vers un serveur web, ce qui devrait diminuer le nombre de connections actives par rapport à http/1.1
    L’encryption TLS sera également plus efficace, et il y aura du http header compression.

    HTTP/2 est largement basé sur le protocole #spdy développé par Google.

    A lire sur le blog du président du HTTP Working Group
    ▻https://www.mnot.net/blog/2015/02/18/http2

    schrödinger @erratic
    • @erratic
      schrödinger @erratic 24/02/2015

      Seven no-bull facts about the new HTTP/2 protocol

      ▻http://www.infoworld.com/article/2886381/internet/seven-no-bull-facts-about-the-new-http-2-protocol.html

      1. It was all Google’s idea (sort of)
      2. It’s the network protocol that’s new, not HTTP itself
      3. You can finally kiss a lot of old HTTP speed tricks good-bye (and good riddance)
      4. We’ll need new tools; fortunately, they’re on the way
      5. The front end will catch up far faster than the back end
      6. Encryption won’t be mandated, but maybe that’s not so bad
      7. Expect the evolution — and the criticism — to continue, for the good

      schrödinger @erratic
    • @stephane
      Stéphane Bortzmeyer @stephane CC BY-SA 30/09/2015

      Voir aussi ▻http://seenthis.net/messages/370917

      Stéphane Bortzmeyer @stephane CC BY-SA
    Écrire un commentaire
  • @liotier
    liotier @liotier CC BY-SA 24/11/2014

    #HTTP/2 ’s mandatory encryption spells the end of my habit of transparent proxying HTTP before WAN links… Goodbye #Squid & #TrafficServer.

    • #http
    • #WAN
    liotier @liotier CC BY-SA
    Écrire un commentaire
  • @liotier
    liotier @liotier CC BY-SA 6/11/2014
    1
    @la_taupe
    1

    #HTTP/2 all the things !
    ▻https://docs.google.com/presentation/d/1l9c9ROjLTD8clOL0yFufAOMbxNC0D-19zCiXMgqtY-M/present#slide=id.p19 #HTTP2 #Google #Web

    • #Google
    • #http
    liotier @liotier CC BY-SA
    Écrire un commentaire
  • @james
    James @james PUBLIC DOMAIN 24/05/2012
    2
    @fil
    @0gust1
    2

    Juste pour mémoire : En route pour #HTTP/2.0
    ►http://linuxfr.org/news/en-route-pour-http-2-0

    James @james PUBLIC DOMAIN
    Écrire un commentaire

Thèmes liés

  • #http/2
  • technology: http
  • #php-fpm
  • #apache
  • technology: http
  • #http/2.0
  • company: google