Tuesday, March 5, 2013

Re: django DB optimization

10,000 people does not sound like too heavy a load. How often will they check their schedules?

If you are looking up items by day and user, then indices on day and (foreign key on) user should be enough to handle a much heavier load.

If you do find you need caching, using Django's built in cache framework first, then maybe something like memcached for db queries.

I would also look at things like connection pooling before you decide you need caching.

On Tuesday, March 5, 2013 4:38:31 AM UTC+5:30, Subodh Nijsure wrote:
Hi,

I have implemented a django application that willl maintain schedule
for 100s of people that work for a company. People access this
schedule using desktop or mobile device to lookup their task list for
current day, this week etc.

Now the question is how do I scale this -- example when user joe looks
up his schedule for today essentially I end up doing a query get
records for today, where user name is joe. Same thing would happen
when Mary looks up her schedule, we do DB lookup for records for Mary.

I am worried that when 10,000 people start to query this my database
is going to become a bottleneck (?) Should I be implementing some of
home grown daemon that caches the data associated with most common
queries and serve the data out of that daemon.

I am sure I am not the first one to encounter this issue, how do
people scale their query response time when using django as their
framework.

(Hope this Q made sense...)

-Subodh

--
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscribe@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

No comments:

Post a Comment