+1 vote for option 5. On Fri, Apr 1, 2011 at 5:02 PM, Adam Nelson <a...@varud.com> wrote:
> > On Thursday, March 31, 2011 10:56:44 PM UTC-4, Javier Guerra wrote: > >> On Thu, Mar 31, 2011 at 7:18 PM, Russell Keith-Magee >> <rus...@keith-magee.com> wrote: >> > Sure. Write a view that returns the content. It's 3 lines of code (a >> > couple more if you count imports and whitespace). Added bonus -- it's >> > actually more efficient than serve(), because it doesn't impose a disk >> > access overhead every time it gets called. >> >> even better, use nginx empty_gif and get the tracking data from the logs. >> >> >> I should have been more exact. This is an actual image even though it > serves the purpose of being our tracking pixel. It looks like the three > options are: > > 1. Use serve() with insecure=True > 2. Open the file and return via HttpResponse() - effectively the same as > serve() with insecure=True. > 3. Use nginx and parse the logs > 4. Use nginx with > Drizzle<https://github.com/chaoslawful/drizzle-nginx-module> to > log to MySQL in real time > 5. Use Amazon CloudFront and parse the logs > > We currently do #1 - but will probably move to #2. Another option is an > extension of RKM's suggestion of using a string representation of the image. > For us that would be a 30KB string. I have the sense that Linux optimizes > away any cost of opening a static file repeatedly so I'm not so concerned > about this. serve() is implicitly doing this and we're serving that file > 100k+ times a day with minimal effort. #5 seems like the best solution for > 1MM+ requests/day. > > Thanks, > Adam > >> -- > You received this message because you are subscribed to the Google Groups > "Django users" group. > To post to this group, send email to django-users@googlegroups.com. > To unsubscribe from this group, send email to > django-users+unsubscr...@googlegroups.com. > For more options, visit this group at > http://groups.google.com/group/django-users?hl=en. > -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com. To unsubscribe from this group, send email to django-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/django-users?hl=en.