How to handle 5 million users? ASP.NET Identity

后端 未结 4 1714
你的背包
你的背包 2021-02-06 01:26

I am running a ASP.NET mvc5 app which currently has 5 million users. It is hosted in the Azure cloud. For the authentication I use the Asp.Net Identity for EntityFramework.

4条回答
  •  心在旅途
    2021-02-06 02:13

    Try to get the exact SQL command from some Azure audit tool and write it to the comment here. 7 second looks like problem in indexes (too long for access by index ant too short for transferring huge data to client).

    INSERT command itself is always quick (if not slowed down by triggers) and does not get slower significantly with increasing number of rows. Identity framework is probably running some SELECT (e.g. to re-read new line...?). Having indexes on all affected columns is not enough. Select command can use only ONE index on each table, so you need to find only ONE index, but the proper one - the correct combination of columns, column order in index is also important. And all this depends on the SQL command, that is the Identity engine trying to execute. Try to find it, then I can help you.

提交回复
热议问题