Go Back   vb.org Archive > vBulletin Modifications > vBulletin 4.x Modifications > vBulletin 4.x Add-ons
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools
vB Accelerator Details »»
vB Accelerator
Version: 0.9, by Vitaly Vitaly is offline
Developer Last Online: Jul 2014 Show Printable Version Email this Page

Category: Board Optimization - Version: 4.0.x Rating:
Released: 06-10-2010 Last Update: 10-21-2010 Installs: 53
Uses Plugins
Re-useable Code  
No support by the author.

ported & significantly improved vb 3.8 branch.

This mod is suited for medium and big boards. It reduces server load, caused by thumnails and big attachments. Includes significant recommendations for server tuning, to speedup pages loading.

what's the problem with?
  1. In original vB all thumbnails a downloaded via php. So, if you page contains 10-20 attached images, then each page php request will be followed by 10-20 thumbnails php requests. That's very bad.
  2. When attachments body transfered via php, that's much more waisteful, than direct transfer of static file. Especially for big files.
  3. Browser does lots of additional requests to static file, to check if modified
  4. JS/CSS not compressed
what this mod does:
  1. All thumbnails will have DIRECT links (served as static files). Much lower reply latency and server load.
  2. If you have nginx webserver, you php-fcgi will not participate in file transfer any more. It will reply with X-Accel-Redirect header. Then nginx will proceed attachment as static file.
    • No more problems with multiple downloads of 10-mb files.
    • No needs to restrict attachments and full-size images for guests and search bots.
  3. Static files are properly cached/compressed after tuning
how to install:
  1. Make sure, attachments are stored on disk, NOT in database.
  2. Make sure, that thumbnails are in web-accessible area. If not - reconfigure your web-server first.
  3. Check manually, that you can download any .thumb file via browser.
  4. !!! Tune cache/compression settings for static files (see example from next post)
  5. Import product XML & tune settings.
  6. Enjoy
This mod is developped here: http://github.com/rcdesign/vb-accelerator . Patches are welcome.

history:

0.9
- fixed path for duplicated attachments

0.8
- fixed back timestamp parameter & substitutions for XML output
- added conversion for assets.php thumbnails (in attachments manager)

0.7
- ported to vb4
- added basic CDN support for thumbnails

Download Now

File Type: xml product-vb_accelerator.xml (12.7 KB, 255 views)

Screenshots

File Type: png vba.png (52.9 KB, 0 views)

Show Your Support

  • This modification may not be copied, reproduced or published elsewhere without author's permission.
2 благодарности(ей) от:
DeMonViTo

Comments
  #12  
Old 06-13-2010, 12:36 AM
kawe kawe is offline
 
Join Date: Aug 2008
Posts: 169
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

This is .htaccess on Nginx ?

PHP Code:
# Modified gzip settings: added CSS/JS,
# but completely disabled for broken browsers.
gzip_types       text/plain text/css application/x-javascript text/xml text/javascript;
gzip_disable     "MSIE [1-6].(?!.*SV1)";


# globally disable external access to attachments, but enable for X-Accel-Redirect
location /uploads {
    
internal;
}
# enable thumbnails direct access, but nothing else!
location ~* /uploads/(.*)\.thumb$ {
    
expires 24h;
}


# Expires for static files.
location /images/ {
    
expires 24h;
}
location /clientscript/ {
    
expires 24h;
}
location /custom # All at once: profile pics, avatars, group images
    
expires 24h;

And about " path to attachments "
is full path like : /home/www/html/sites.com/attachment
or
just /attachment/
Reply With Quote
  #13  
Old 06-13-2010, 12:46 AM
Vitaly's Avatar
Vitaly Vitaly is offline
 
Join Date: Apr 2004
Location: Russia, St.Petersburg
Posts: 428
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by kawe View Post
This is .htaccess on Nginx ?
Nginx doesn't support .htaccess. That's pаrt of config file. Please, read nginx documentation for details.
Reply With Quote
  #14  
Old 06-13-2010, 12:58 AM
kawe kawe is offline
 
Join Date: Aug 2008
Posts: 169
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Vitaly View Post
Nginx doesn't support .htaccess. That's pаrt of config file. Please, read nginx documentation for details.
yeah i add this code to /etc/nginx/sites-enable/mydomain.com
under my vBseo config its right ?
Reply With Quote
  #15  
Old 06-13-2010, 01:01 AM
Vitaly's Avatar
Vitaly Vitaly is offline
 
Join Date: Apr 2004
Location: Russia, St.Petersburg
Posts: 428
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by TeknoSounds View Post
Will this work along side vbOptimize and vB4: Supercharged? Are there conflicts? Duplicated features?
vbOptimize do different things. It can make sence, if you have DB on separate server. Or if you setup many dirty-written mods . No conflicts. If you have local DB, then built-in query cache do most things for you.

Supercharged have some interesting ideas, but not balanced, IMHO. The same result can be acheived with much less efforts & server load

vb Accelerator - if you dont use attachments, skip it . But set "not expire" headers for static content. It really worth to do.
Reply With Quote
  #16  
Old 06-13-2010, 01:06 AM
Vitaly's Avatar
Vitaly Vitaly is offline
 
Join Date: Apr 2004
Location: Russia, St.Petersburg
Posts: 428
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by kawe View Post
yeah i add this code to /etc/nginx/sites-enable/mydomain.com
under my vBseo config its right ?
Gzip options can be in other place. Look there they are in your config, compare difference and fix.

Other rewrites should be BEFORE vbseo.
Reply With Quote
  #17  
Old 06-14-2010, 06:24 PM
Fenriz Fenriz is offline
 
Join Date: Aug 2002
Posts: 126
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Can I use Mod Version: 0.8 with vbulletin 3.8.5?
Reply With Quote
  #18  
Old 06-15-2010, 05:39 AM
Vitaly's Avatar
Vitaly Vitaly is offline
 
Join Date: Apr 2004
Location: Russia, St.Petersburg
Posts: 428
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

NO. You should use version from this topic: https://vborg.vbsupport.ru/showthread.php?t=207566
Reply With Quote
  #19  
Old 06-22-2010, 09:30 AM
tupique tupique is offline
 
Join Date: May 2010
Posts: 14
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Installed, but downloaded from other forum by accident. However, I don't see that the URL is changing. I still see attachment.php as part of the URL. Am I missing something here?
Reply With Quote
  #20  
Old 06-22-2010, 10:54 AM
Vitaly's Avatar
Vitaly Vitaly is offline
 
Join Date: Apr 2004
Location: Russia, St.Petersburg
Posts: 428
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

You should check thumbnails path, but not full-size attachments links.

If you have problems, please provide more detailed information. For example - incorrect thumbnails URLs
Reply With Quote
  #21  
Old 06-22-2010, 11:45 AM
tupique tupique is offline
 
Join Date: May 2010
Posts: 14
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

ahh I see.. so this mod is used to change the thumbnails URL only, not the full image? I did simple checking (disabling and enabling this mod), and I saw what you meant. Thanks a lot!

Another question, the URL in my forum is like this:

http://<domain hidden>/img/1/1.thumb?d=1276962745

Could you remove the query string parameter? It ruins the purpose of image caching, since the parameter value always changing while the image stays the same.
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 08:02 PM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.04694 seconds
  • Memory Usage 2,349KB
  • Queries Executed 26 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (1)bbcode_php
  • (4)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (4)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (3)pagenav_pagelink
  • (11)post_thanks_box
  • (1)post_thanks_box_bit
  • (11)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (1)post_thanks_postbit
  • (11)post_thanks_postbit_info
  • (10)postbit
  • (2)postbit_attachment
  • (11)postbit_onlinestatus
  • (11)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • fetch_musername
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • post_thanks_function_fetch_thanks_bit_start
  • post_thanks_function_show_thanks_date_start
  • post_thanks_function_show_thanks_date_end
  • post_thanks_function_fetch_thanks_bit_end
  • post_thanks_function_fetch_post_thanks_template_start
  • post_thanks_function_fetch_post_thanks_template_end
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_attachment
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete