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.

StripeEu Twistedbytes Presentation

423 views

Published on

How to host a silverstripe Website.
Intended to talk about this @ StripeEU 2015

Published in: Internet
  • Be the first to comment

  • Be the first to like this

StripeEu Twistedbytes Presentation

  1. 1. How to host a SilverStripe website. The right way.
  2. 2. This presentation ● About Twisted Bytes ● Basic Server Setup ● Silverstripe specifics ● From small to big
  3. 3. About us ● Hosting company without servers ● Helping developers ● Deliver your product → end-users ● Based in Enschede, The Netherlands ● Twitter: @twistedbytes_nl ● http://www.twistedbytes.nl
  4. 4. About me ● Developer → sysadmin ● Linux, run & maintain servers ● Know software dev & sys admin ● Twitter: @DerkGortemaker
  5. 5. Basic Webserver: Apache or Nginx Database: MySQL/MariaDB or PostgreSQL or MongoDB/NoSQL Runtime: PHP Access / Deployment Monitoring Backup server setup
  6. 6. Basic server setup ● Apache or Nginx ○ .htaccess is useful ● Time spent in webserver vs application Webserver: Apache or Nginx
  7. 7. Basic server setup ● MariaDB is good for most jobs ○ default in most distributions by now. ○ Easy to make an master-master ● Everything else needs a good reason Database: MySQL/MariaDB or PostgreSQL or MongoDB/NoSQL
  8. 8. Basic server setup ● Use PHP with php-fpm ○ Apache event MPM ● Enable opcode cache ● PHP 7 around the corner (end 2015) ○ silverstripe is not compatible :-( Runtime: PHP
  9. 9. Basic server setup ● HHVM could be a good choice ○ Busy site ○ 1 maybe 2 sites on a server ○ many cpu cores ● http://www.twistedbytes. nl/blog/php-vs-hhvm-silverstripe- english/ ● Runs Silverstripe ● PHP 7 is easier to maintain, HHVM Runtime: HHVM
  10. 10. Basic server setup ● FTP/SFTP ● SSH ○ mariaDB ssh tunnel ● GIT ○ capistrano ○ deploy.php Access / Deployment
  11. 11. Basic server setup ● As a service or “Home Grown” ● Local and Remote ● Metrics and Alerting ● Log Files Monitoring (sucks)
  12. 12. Basic server setup ● What is the worst that can happen? ● How to restore? ● Can you reach the backup? ● Can you rebuild the server? ● What to Backup? Backup
  13. 13. Silverstripe specifics ● php-fpm + opcache ● Give MariaDB memory ● Keep some memory free for Linux cache ● More memory = more FS and database caching ● More cores = more speed for busy sites ● Busy site: HHVM is an option
  14. 14. Silverstripe specifics ● silverstripe-cache ○ Files or MemCache ● What’s up with this: ○ Rewrite file every request, with lock? ○ zend_cache--- i18nZend_Translate_RailsYaml_Options ○ zend_cache---internal-metadatas--- i18nZend_Translate_RailsYaml_Options
  15. 15. Silverstripe specifics assets ● Scaling problem. ● Needs shared filesystem, none found yet ○ Glusterfs works, but slow ○ NFS works, but single point ○ Big NFS clusters are “expensive” ● Solved by silverstripe-cloudassets? ○ assets to S3 (or Swift)
  16. 16. Growth: small → big (1) ● What are you trying to solve? ○ Faster site ○ Survive a failure
  17. 17. Growth: small → big (2) ● What’s slowing down the site/page ○ Database ○ Profile code ■ Waiting ● Remote api ● Disk IO ● Xdebug + (win|k)cachegrind ● NewRelic / Blackfire
  18. 18. Growth: small → big (3) ● Simplest option = make the server bigger ● Split servers or add servers? ○ Split → multiple failure points ○ Add servers → more capacity ● At every level add failover
  19. 19. Growth: small → big (4) ● Caching ○ silverstripe-cache ■ silverstripe-staticpublishqueue ○ Varnish ○ Cloudflare / CDN
  20. 20. We like to hear from you! Want to learn about a better way to do hosting? Or have some ideas about what you are missing? Please contact us to exchange ideas. info@twistedbytes.nl

×