educative.io

How does pre-generating the timeline solve the problem of heavy loads for people with a lot of followers?

  1. For live updates, the server pushing (or notifying about) newer posts to users could lead to very heavy loads, especially for people or pages that have a lot of followers. To improve the efficiency, we can pre-generate the timeline and store it in a memory.

How does pre-generating the timeline solve the problem of heavy loads for people with a lot of followers? It seems that pre-generation actually causes a lot of load, because for people with many followers, it will trigger many pregenerations.

Hi @Dewey_Munoz

Pre generating means the server has already pushed updates and saved them in the memory. So whenever a new update occurs, the server doesn’t have to start it from scratch and put its load on the user account, it will take that saved update from memory, change its data accordingly to the new update and show it. Pre generations will not put a load on the user as they will be done when the user timeline/server is free.