Simple Site Speed Improvements (SMX 2010)

Ralf Schwoebel
Ralf SchwoebelCEO at orga.zone, Inc.
optimize, reduce & cache
   Improving Page Speed
   With Open Source Tools
           March 2010
      by Ralf Schwoebel, CEO
          www.tradebit.com
Who is Ralf?
• Started one of the first online Shopping Malls
  in Germany 1995
• Got into SEO in 2002
• Started tradebit.com in 2005 as Tradebit, Inc.
• Today: more than 20,000 digital good sellers
• Answering more than 5 mio. web requests
  daily

21.03.12                                           2
Focus on speed when SEO is done




21.03.12                            3
What makes it slow
               Your
             Provider



                                                                            Your
    Your                 … ……
                                                                          Potential
Cool Site.com           …………..
                                                                           Buyer
                         ……….
    code                         (1) The distance of your buyer to the server
                                 (2) Your database setup
                                 (3) Your programming logic (PHP, Java, etc.)
                                 (4) Amount of objects per page requested



  21.03.12                                                                       4
optimize, reduce and cache
• Optimize:       improve database, improve
                  code, etc.
• Reduce:         picture size, objects per page,
                  distance, etc.
• Cache:          have everything ready for the
                  next request


21.03.12                                            5
Using Open Source tools
• Search:        Sphinx (or Lucene)

• Cache:         Memcache & Squid

• Code:          XCache for PHP




21.03.12                              6
Embrace the Squid
• www.squid-cache.org : free proxy for Lin/Win
• Easy to setup, powerful, stable, scalable, fast

                              images
             Your
           Wordpress/
           vBulletin/
             shop
                          +           javascript   = 20+ reqs
             .php

                                css



21.03.12                                                    7
Divide and conquer!
• Put the statics into cache, lower server load!

                 Transparent Proxy with Squid



                                            images
             Your
           Wordpress/
           vBulletin/                      javascript
              etc
             .php
                                                css



21.03.12                                                8
Go global
• Local delivery from the closed hub
• Load balancing included, also fail-over




                  squid
                                      squid
           Your
           page                          images
           .php
                                        javascript

                                              css



21.03.12                                             9
How much is it?
• Example calculation with 8 VPS Installations
• Medium VPS: ca. $50 / month = 400US$ / m

Think: „main market and who is far away?“
Hosting: California
4 US Squids in: TX, NY, MI and FL
4 globals in: 1 Europe, 2 Asia, 1 Australia


21.03.12                                         10
Config for the admin
http_port                93.189.89.113:80 vhost vport
visible_hostname         es.tradebit.com

cache_peer_access         p1 allow http
cache_peer                74.55.216.24 parent 80 0 no-query originserver ..
..sourcehash monitorurl=http://p1.tradebit.com/livewatch.php name=p1 login=PASS
#(add more peers for failover)

collapsed_forwarding     on
refresh_stale_hit        600 seconds
acl all src              0/0
http_access              allow all

cache_mem                256 MB
cache_swap_low           90
cache_swap_high          95

cache_dir ufs            /opt/squid 10000 16 256

maximum_object_size       2048 KB
maximum_object_size_in_memory 512 KB



  21.03.12                                                                  11
Conclusion
• A fistful of dollars gives you:
      – A global content distribution network
      – Increased speed = higher conversions
      – A security layer between your site and hackers
      – A fail-over solution to sleep better
      – Less load on your main servers




21.03.12                                                 12
Thank you!
For questions:   puzzler@tradebit.com
Twitter:         trabit
Skype:           tradebit

                 Have a great day!
                  Ralf Schwoebel


21.03.12                                13
1 of 13

More Related Content

Similar to Simple Site Speed Improvements (SMX 2010)(20)

Simple Site Speed Improvements (SMX 2010)

  • 1. optimize, reduce & cache Improving Page Speed With Open Source Tools March 2010 by Ralf Schwoebel, CEO www.tradebit.com
  • 2. Who is Ralf? • Started one of the first online Shopping Malls in Germany 1995 • Got into SEO in 2002 • Started tradebit.com in 2005 as Tradebit, Inc. • Today: more than 20,000 digital good sellers • Answering more than 5 mio. web requests daily 21.03.12 2
  • 3. Focus on speed when SEO is done 21.03.12 3
  • 4. What makes it slow Your Provider Your Your … …… Potential Cool Site.com ………….. Buyer ………. code (1) The distance of your buyer to the server (2) Your database setup (3) Your programming logic (PHP, Java, etc.) (4) Amount of objects per page requested 21.03.12 4
  • 5. optimize, reduce and cache • Optimize: improve database, improve code, etc. • Reduce: picture size, objects per page, distance, etc. • Cache: have everything ready for the next request 21.03.12 5
  • 6. Using Open Source tools • Search: Sphinx (or Lucene) • Cache: Memcache & Squid • Code: XCache for PHP 21.03.12 6
  • 7. Embrace the Squid • www.squid-cache.org : free proxy for Lin/Win • Easy to setup, powerful, stable, scalable, fast images Your Wordpress/ vBulletin/ shop + javascript = 20+ reqs .php css 21.03.12 7
  • 8. Divide and conquer! • Put the statics into cache, lower server load! Transparent Proxy with Squid images Your Wordpress/ vBulletin/ javascript etc .php css 21.03.12 8
  • 9. Go global • Local delivery from the closed hub • Load balancing included, also fail-over squid squid Your page images .php javascript css 21.03.12 9
  • 10. How much is it? • Example calculation with 8 VPS Installations • Medium VPS: ca. $50 / month = 400US$ / m Think: „main market and who is far away?“ Hosting: California 4 US Squids in: TX, NY, MI and FL 4 globals in: 1 Europe, 2 Asia, 1 Australia 21.03.12 10
  • 11. Config for the admin http_port 93.189.89.113:80 vhost vport visible_hostname es.tradebit.com cache_peer_access p1 allow http cache_peer 74.55.216.24 parent 80 0 no-query originserver .. ..sourcehash monitorurl=http://p1.tradebit.com/livewatch.php name=p1 login=PASS #(add more peers for failover) collapsed_forwarding on refresh_stale_hit 600 seconds acl all src 0/0 http_access allow all cache_mem 256 MB cache_swap_low 90 cache_swap_high 95 cache_dir ufs /opt/squid 10000 16 256 maximum_object_size 2048 KB maximum_object_size_in_memory 512 KB 21.03.12 11
  • 12. Conclusion • A fistful of dollars gives you: – A global content distribution network – Increased speed = higher conversions – A security layer between your site and hackers – A fail-over solution to sleep better – Less load on your main servers 21.03.12 12
  • 13. Thank you! For questions: puzzler@tradebit.com Twitter: trabit Skype: tradebit Have a great day! Ralf Schwoebel 21.03.12 13