Thread: Board Optimization - vB Accelerator
View Single Post
  #2  
Old 03-06-2009, 11:54 PM
Vitaly's Avatar
Vitaly Vitaly is offline
 
Join Date: Apr 2004
Location: Russia, St.Petersburg
Posts: 428
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Faq

Q1. I don't have nginx. Will this mod work for me?

Yes, partially. Enable direct thumbnail links, but disable nginx acceleration. You'll still have serious benefit, if your forum is plenty of attachments.

Q2. What about lignttpd, apache and so on? They have X-Sendfile, alternative to nginx X-Accel-Redirect.

I know, but:
  • I don't have such configurations to test, and I don't have time to implement that. You can do it yourself or hire someone (NOT ME) for this work.
  • X-Sendfile don't support partial content download . Nginx's X-Accel-Redirect it the best you can use.
Q3. Is it safe to give direct access for thumbnails?

Why not? You can give direct access for thumbnails, but disable direct access to original files. Just configure your server properly. See examples below.

Q4. Thumbnails looks like files with strange extention and mime-type. Will those be ok in browser?

Yes. HTML-page address those files via imagetag. So, browser show those properly, even with wrong mime and strange extention.

Q5. Why don't you fix that for sure?

Because that requires vB sources modification, and i hate such things. And if everyting works fine, who cares about mimes ?

Q6. My forum has 20 users online, and I don't see difference at my 32-core server with 128Gb ram and 8 SSD raid array.

You a happy man, really.

Q7. Does it work with VBSEO ?

If attachment rewrite is disabled - yes, it works. And check, that attachments path is separated in vbseo rewrite rules in webserver config. I use vbseo in this mode with no problems. Sorry, no plans now to make better integration with vbseo. But code is reuseable, or you can send your patches



Server configuration examples

let's say, whe have the following folders structure:

/uploads
/uploads/blogs/* <- blog attachments & thumbnails
/uploads/posts/* <- forum attachments & thumbnails
/uploads/albums/* <- album images
/uploads/al_thumbs/* <- album previews

So, we have to setup direct access for thumbtails, but protect original files.

Nginx

# globally disable external access, but enable for X-Accel-Redirect
location /uploads {
internal;
}
# enable direct access to blogs & posts thumbnails, but nothing else!
location ~* /uploads/(.*)\.thumb$ {
}
# enable direct access to album thumbnails
location /uploads/al_thumbs/ {
}

Apache/Lighttpd

TBD. You are welcome to share your one
Reply With Quote
 
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01051 seconds
  • Memory Usage 1,770KB
  • Queries Executed 11 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD_SHOWPOST
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_box
  • (1)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (1)post_thanks_postbit_info
  • (1)postbit
  • (1)postbit_onlinestatus
  • (1)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • reputationlevel
  • showthread
Included Files:
  • ./showpost.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_postinfo_query
  • fetch_postinfo
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showpost_start
  • bbcode_fetch_tags
  • bbcode_create
  • postbit_factory
  • showpost_post
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • showpost_complete