COUNTING METHOD OF BROWSING FREQUENCY IN WEB AP

Asked 1 years ago, Updated 1 years ago, 309 views

For example, Mercari counts the total number of views of each item, and you can refer to the items you have listed.
What comes to mind when the number of views is permanent is that each time you browse a product, you get the last number of views from the RDB, count it up, and save it to the RDB.
However, if you use this method with a large number of users like Mercari, you will get a lot of SQL per unit of time, which will cause performance problems.

In addition to the above methods, I would appreciate it if you could let me know if there are any other common ways to count the number of views.

sql

2022-11-27 06:16

2 Answers

Depending on the environment, the options you can choose will change. Assuming a typical LAMP environment,
NOSQL memcache How about using it?

Memcached::increment


2022-11-27 06:30

I will exclude browsing by the same user, so I don't think it will be possible to do it just by going up.
Maybe RDB would be fine.

In the first place, a large amount of SQL should always be issued whether it is viewed or accessed by logged-in users.


2022-11-27 06:44

If you have any answers or tips


© 2024 OneMinuteCode. All rights reserved.