rbs change - architecture et scalabilité

Download RBS Change - Architecture et scalabilité

If you can't read please download the document

Upload: rbschange

Post on 22-Jun-2015

675 views

Category:

Technology


0 download

DESCRIPTION

RBS Change - Architecture et scalabilité workshop

TRANSCRIPT

  • 1. Architecture et scalabilit 1 RBS 2012 REPRODUCTION INTERDITE TOUS DROITS RESERVS www.rbs-software.fr

2. 2ProgrammeProgramme PrsentationPrsentationArchitectureArchitecturePrparation Prparation de lenvironnementInstallationInstallation de RBSChangeScalabilit ? DfinitionScalabilit ? DfinitionGestion du cacheConfiguration du cacheGestion du cachePerformance Configuration du cacheQuelques exemplePerformanceA propos de scuritProblmes courantsQuelques exemplesQuestions A propos de la scuritProblmes courantsQuestions RBS 2012 REPRODUCTION INTERDITE TOUS DROITS RESERVS www.rbschange.fr 3. PrsentationProgrammePrsentationVotre serviteurArchitectureCommunity ManagerFormationPrparation SupportInstallationDocumentationScalabilit ? DfinitionRBSGestion du cacheExiste depuis 1997Configuration du cache135 salarisInfrastructure, Mobilit, ERP, WebPerformanceQuelques exempleRBS ChangeA propos de scurit2001 : Cration de WebEditProblmes courants2004/2005 : Refactoring pragmatique2006 : e-CommerceQuestions 2010 : Fvrier 2010 libration du code RBS 2012 REPRODUCTION INTERDITE TOUS DROITS RESERVS www.rbschange.fr 4. ArchitectureProgrammeServeur HTTPServeur HTTPPrsentationArchitecturePrparationInstallationScalabilit ? DfinitionConnecteursFrameworkModulesConnecteursGestion du cacheFrameworkModules API, WS... API, WS...Configuration du cachePerformanceQuelques exemplePHP 5PHP 5A propos de scuritProblmes courants SolR SolRQuestionsBase de donnes Base de donnes JavaJava Systme dexploitation Systme dexploitation RBS 2012 REPRODUCTION INTERDITE TOUS DROITS RESERVSwww.rbschange.fr 5. ArchitectureProgramme EnvironnementPrsentation Stack LAMP et MAMP classiqueArchitecture Stack WAMP avec prrequis Environnement Java pour SolRPrparationInstallationPrrequis WAMPScalabilit ? Dfinition VistaGestion du cache Server 2008Configuration du cache=> php.net/manual/en/function.symlink.phpPerformanceQuelques exempleA propos de scuritSizingProblmes courantsQuestions Hypothse Serveur ddi Site normal 1 CPU, 2 curs Serveur ddi 4 G RAM 20 G disque RBS 2012 REPRODUCTION INTERDITE TOUS DROITS RESERVSwww.rbschange.fr 6. Prparation de lenvironnement : BDDProgrammePrsentationArchitecturePrparationInstallationMoteurs supportsScalabilit ? DfinitionMySQLMariaDBGestion du cacheOracle (extension communautaire)Configuration du cachePerformance Configuration MySQLInnoDB activQuelques exempleinnodb_file_per_tableA propos de scuritProblmes courantsQuestions RBS 2012 REPRODUCTION INTERDITE TOUS DROITS RESERVS www.rbschange.fr 7. Prparation de lenvironnement : PHPProgramme VersionsPrsentation5.3Architecture5.4Prparation PaquetsInstallationphp5php5-cliScalabilit ? Dfinitionphp5-curlGestion du cachephp5-gdConfiguration du cachephp5mysqlphp5-xslPerformance (php5-imagick)Quelques exempleA propos de scuritConfigurationshort_open_tag offProblmes courantsmagic_quotes_gpc offQuestions memory_limit au minimum 192Mdefault_charset utf-8session.cache_limiter " "post_max_size et upload_max_filesize RBS 2012 REPRODUCTION INTERDITE TOUS DROITS RESERVS www.rbschange.fr 8. Prparation de lenvironnement : HTTPProgramme Serveurs validsPrsentationApache 2ArchitectureZend ServerCherokeePrparationInstallationObligatoirementActiver la r-criture dURL (rewrite)Scalabilit ? DfinitionLe serveur doit pouvoir satteindreGestion du cacheConfiguration du cacheRecommandsActiver la compression (deflate)PerformancePermettre la modification des en-ttes (headers)Quelques exempleGestion dexpiration du cache (expires)A propos de scuritProblmes courantsCt vhostsAjout des types XUL pour le back officeQuestionsAddType application/vnd.mozilla.xul+xml .xulAddType text/xml .xblNous ne parlerons que du serveur Apache tant donn quil sagit du plusrpandu RBS 2012 REPRODUCTION INTERDITE TOUS DROITS RESERVS www.rbschange.fr 9. Prparation de lenvironnement : HTTP ServerName demo.local.rbschange.frProgrammeAssignUserID demo demoPrsentationServerAdmin demo@localhostArchitectureCustomLog /var/log/apache2/demo.local.rbschange.fr.log combinedPrparation # specific types for Change backofficeAddType application/x-xpinstall .xpiInstallationAddType application/vnd.mozilla.xul+xml .xulAddType text/xml .rdf .xblScalabilit ? Dfinition# Expires headerExpiresActive OnGestion du cacheExpiresByType image/gif A7200ExpiresByType image/png A7200Configuration du cacheExpiresByType image/jpeg A7200ExpiresByType text/css A7200Performance ExpiresByType text/javasript A7200ExpiresByType application/x-javascript A7200ExpiresByType application/x-shockwave-flash A7200Quelques exemple # Text data compressionA propos de scurit AddOutputFilterByType DEFLATE text/html text/css text/plain text/xml application/x-javascript application/jsonProblmes courants DeflateCompressionLevel 1 BrowserMatch ^Mozilla/4 gzip-only-text/htmlQuestionsBrowserMatch ^Mozilla/4.0[678] no-gzip BrowserMatch bMSIE !no-gzip !gzip-only-text/html DocumentRoot /home/demo/www Options Indexes FollowSymLinks MultiViews AllowOverride All Order allow,deny allow from all RBS 2012 REPRODUCTION INTERDITE TOUS DROITS RESERVSwww.rbschange.fr 10. Prparation de lenvironnement : SolRProgrammePrsentationArchitecturePrparationInstallationImplicationsScalabilit ? DfinitionJREUn serveur applicatif (Tomcat ou Jetty)Gestion du cacheExposition publique facultativeConfiguration du cachePerformance Configuration de SolRFichiers de configuration situs dansQuelques exemple framework/config/solr/conf A propos de scuritEn fonction de la volumtrie on peutProblmes courants jouer sur les paramtres Xms et Xmx de la JVMQuestionsCompatible SolR v1.4.1 / Incompatible SolR 3.0.xTuning du GC de la JVM RBS 2012 REPRODUCTION INTERDITE TOUS DROITS RESERVS www.rbschange.fr 11. 11Installation de RBSChange Programme Prsentation Architecture Prparation Webinstaller Installation Fichier zip Scalabilit ? Dfinition Ligne de commande Gestion du cacheAu minimum : Configuration du cache config Performance framework Quelques exemple themes change.properties A propos de scurit change.xml Problmes courants profile Questions RBS 2012 REPRODUCTION INTERDITE TOUS DROITS RESERVS www.rbschange.fr 12. 12Installation de RBSChange Programme Prsentation Architecture Prparation Installation Scalabilit ? Dfinition Gestion du cache Exemples dinstallation : Configuration du cacheWebinstallerPar la ligne de commande Performance Quelques exemple A propos de scurit Problmes courants Questions RBS 2012 REPRODUCTION INTERDITE TOUS DROITS RESERVS www.rbschange.fr 13. 13Scalabilit ? Dfinition Programme PrsentationScalabilit Architecture PrparationEn informatique matrielle et logicielle et entlcommunications, le mot anglais scalability dsigne Installationla capacit dun produit sadapter un changement Scalabilit ? Dfinition dordre de grandeur de la demande (monte en charge). Gestion du cache En particulier sa capacit maintenir ses fonctionnalits et sesperformances en cas de forte demande. Configuration du cache Performance... Quelques exemple A propos de scurit La scalabilit peut faire rfrence la capacit dun systme accrotre sa capacit de calcul sous une charge accrue quand Problmes courantsdes ressources (gnralement du matriel) sont ajoutes. Questions Source : Wikipdia (fr.wikipedia.org/wiki/Scalabilit) RBS 2012 REPRODUCTION INTERDITE TOUS DROITS RESERVS www.rbschange.fr 14. 14 Gestion du cache Programme Prsentation Architecture Prparation But InstallationDiminuer le temps de traitement et la charge ct serveur Scalabilit ? Dfinition Gestion du cacheLeviers Configuration du cache Apache (module expires) Cache dopcode Performance Reverse proxy-cache Quelques exempleCache Mongo A propos de scurit Cache de fichiers Problmes courants Questions Pas de validation avec MySQL Proxy RBS 2012 REPRODUCTION INTERDITE TOUS DROITS RESERVSwww.rbschange.fr 15. 15 Configuration du cache Programme Activation cache : Fichier project.xml Prsentation Architecture Prparation f_DataCacheFileService Installation Scalabilit ? Dfinition Gestion du cacheGranularit du cache Configuration du cacheDure de vie configurable Performance Complet Cache de bloc dbrayable Quelques exempleCache de donnes indpendant et dbrayable A propos de scurit...... Problmes courants...... Questions ......... Les services de gestion du cache sont disponibles dans framework/cache/*Service.php Pour voir les configuration du cache framework/config/project.xml RBS 2012 REPRODUCTION INTERDITE TOUS DROITS RESERVS www.rbschange.fr 16. 16Performance Programme Prsentation Architecture Prparation Leviers InstallationSystme de cache Scalabilit ? Dfinition Proxy-cache Base de donnes (index) Gestion du cache Mode cluster Configuration du cache Performance Quelques exemple A propos de scurit Problmes courants Questions RBS 2012 REPRODUCTION INTERDITE TOUS DROITS RESERVS www.rbschange.fr 17. 17 Exemple priode de soldes2010 Programme Prsentation Architecture Prparation Installation Scalabilit ? Dfinition Gestion du cache Configuration du cache Performance Quelques exemple A propos de scurit Problmes courants Questions RBS 2012 REPRODUCTION INTERDITE TOUS DROITS RESERVS www.rbschange.fr 18. 18 Anne 2012 Programme Prsentation Architecture Prparation Installation Scalabilit ? Dfinition Gestion du cache Configuration du cache Performance Quelques exemple A propos de scurit Problmes courants Questions RBS 2012 REPRODUCTION INTERDITE TOUS DROITS RESERVS www.rbschange.fr 19. 19 A propos de la scurit Programme Prsentation Architecture De base Dveloppements noyau tests Prparation PDO utilisation de prepared statements et de requtes Installation paramtres Scalabilit ? Dfinition Cot en temps de paramtrage Gestion du cachePossibilit de mettre en place un WAF Configuration du cacheIncompatible avec le module Apache security (config de base) Performance A vos risques et prils Quelques exempleInstaller des modules partir de sites non officiels A propos de scurit Problmes courants Questions += Plus dinfo sur PDO et linjection SQL sur StackOverflow Plus dinformation sur NAXSI : http://code.google.com/p/naxsi/ RBS 2012 REPRODUCTION INTERDITE TOUS DROITS RESERVS www.rbschange.fr 20. 20 Problmes courants Programme Prsentation Architecture Prparation Installation Scalabilit ? DfinitionGestion des droits niveau systme Gestion du cache Serveur qui narrive pas se rsoudre Configuration du cache Performance Modification du paramtre open_basedir Quelques exemple Too many open files pour SolR A propos de scurit Problmes courants Questions RBS 2012 REPRODUCTION INTERDITE TOUS DROITS RESERVSwww.rbschange.fr 21. QuestionsProgrammePrsentationArchitecturePrparationInstallationScalabilit ? DfinitionGestion du cacheConfiguration du cachePerformanceQuelques exempleA propos de scuritProblmes courantsQuestions RBS 2012 REPRODUCTION INTERDITE TOUS DROITS RESERVS www.rbschange.fr 22. ProgrammePrsentationArchitecturePrparationInstallationGestion du cacheMERCIConfiguration du cachePerformanceQuelques exempleA propos de scuritProblmes courantsQuestions RBS 2012 REPRODUCTION INTERDITE TOUS DROITS RESERVS www.rbschange.fr