Search code examples
google-cloud-spanner

Hotspots in specific ranges in a table in my Cloud Spanner Instance


I am using Cloud Spanner with my Application and I see hotspots on specific ranges in one of my tables. Are there any problems with my schema design or queries that are causing this?

Tried running some load tests and identified hotspots


Solution

  • First, make sure you follow best practices for schema design. If the problem still persists, it could be a natural hotspot where a certain range of keys are getting accessed quite heavily. If this starts happening suddenly, Spanner already has an automatic mechanism which will try to ‘break’ the hotspot. But it might need deeper attention if the problem persists.