Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 507015
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T06:45:39+00:00 2026-05-13T06:45:39+00:00

I am using nginx and redis in my website. For several items on my

  • 0

I am using nginx and redis in my website. For several items on my site, I want to add tracking params to their urls so that when a user clicks on an item, I can collect statistics of user usage apart from serving the content user requested. I am looking for methods on how to capture this statistics in redis from nginx, i.e. without hitting the background application.

For eg., suppose I have several rows of tables on my page and each table hold items in row/column format. So, for an item in {table: 2, row: 1, column: 3} if the actual url is: http://www.mysite.com/news/dodi, then I want to embed the url: http://www.mysite.com/news/dodi/day=29?table=2&row=1&column=3. When the user clicks on it, nginx will hit redis to fetch the content and also update the appropriate statistics (here can be increment day-29, table-2, …).

Any suggestion on how I achieve this without hitting the background app?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-13T06:45:39+00:00Added an answer on May 13, 2026 at 6:45 am

    For the tracking parameters, keep this type of work outside the scope of the users request. Don’t make them pay the latency penalty for stats tracking. Cron a script that extracts the parameters from access.log and updates redis and/or database.

    In terms of caching content, there is a recently released nginx redis module that works in much the same way as the memcached module. Only GET and SELECT are presently implemented. The assumption is that your application is populating the cache.

    http://wiki.nginx.org/Nginx3rdPartyModules#HTTP_Redis_Module

    Sample nginx.conf:

    http
    {
     ...
            server {
                location / {
                    set $redis_db   "0";
                    set $redis_key  "$uri?$args";
                    redis_pass      127.0.0.1:6379;
                    error_page      404 502 504 = @fallback;
                 }
    
                 location @fallback {
                     proxy_pass      backed;
                 }
            }
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I just moved my Wordpress site from using nginx to Apache2, and found that
I've made a small web app using web.py that I now want to put
I'm currently building a real-time betting engine using redis / thin / sinatra. A
I run Django on Windows Server 2k3 under Nginx using FastCGI. Nginx is is
I would like to know how I can achieve the following using the nginx
Using Rails 3.0.3 in combination with gems like devise I don't get any flash
Using Rails 3.0.3 in combination with gems like devise I don't get any flash
I have several webapps deployed to production. I have used Tomcat as my servlet
Is there any way (server or client side) to force the browser to pull
It seems like I have not clearly communicated my problem. I need to send

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.