1

I have a drupal 7 site.

Running a auto login feature when people click on my newsletter.

A hook is fired when they visit the site to check for the cookie. my setup : Background info : I am already using Memcache, APC, Varnish,

2 Varnish Servers (8 GB)
1 Db percona server (32 GB)
1 HaProxy 4
Webservers, 16 GB

my question is, Performance wise. I can see that my server cannot handle 8000 users logging in.

Is there any way to make this impact on the server more "soft" in terms of performance. So my DB doesnt go down. when 8000 request auto login at the same time.

Example 1.

Ex: 1 request to auto login, causing 3-4 query to DB via the core Drupal API if so if I get 1000 users at the same time I got 3000 queries to DB -> DB cannot handle the load. What to do ?!

Best regards

Victor

  • 1
    The only thing you can do is get better hardware really, it's a simple matter of numbers. For a login to happen you'll obviously need to see at least one database query every time, and if your server dies with 3000 concurrent connections it's probably not going to do much better with 1000. And even if it does, as soon as you scale the number of users up the problem returns. Unless you can put everyone's auth details into memcache or something and convince Drupal's login system to use that instead. But I think it would be a fair amount of work – Clive Sep 5 '13 at 8:49
  • thx a lot Clive, yep, I think I need to look on Memcache and go that direction, sadly as it is. – Vic Sep 5 '13 at 9:13
0

You could cache the content and displaying it cached would ideally take stress off your database. Check out module "Boost" it can help.

Ideally optimization of the site is what is needed along with better hardware and maybe Varnish.

If you are using views consider using views built in cache with time based expiration to take stress off database.

Update

If you already have Varnish, APC and memcache then the only other think you can really do is get some better hardware.

We have servers that get about double what you have and they run on a quad core processor with 32GB of RAM.

We also split Web and DB server so we can utilize APC for Web Server and memcache for DB server.

Have you checked your APC stats? Varnish probably won't do much unless you configure it to cache Authenticated traffic which by default bypasses Varnish.

What are your server stats?

  • I update my question. :) – Vic Sep 5 '13 at 4:55
  • Varnish is configures and tweaked to hit the Auth users, Apc is working fine. Memcache too. – Vic Sep 6 '13 at 3:36

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.