Successfully reported this slideshow.

StripeEu Twistedbytes Presentation

0

Share

Loading in …3
×
1 of 20
1 of 20

StripeEu Twistedbytes Presentation

0

Share

Download to read offline

Description

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

Transcript

  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

Description

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

Transcript

  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

More Related Content

Related Books

Free with a 30 day trial from Scribd

See all

Related Audiobooks

Free with a 30 day trial from Scribd

See all

×