function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Cool_DevloperCool_Devloper 

Concurrency Issues with VF pages

Hello VF gurus,

I have a basic question w.r.t VF pages.

There is a scenario, wherein "n" no of users sumiltaneously access the same VF page and submit the entered information. In the backend, the controller creates a new record based on the information entered.

Now, my question is that how this concurrency is taken care of? If multiple users click on Submit at the same time, and the same controller method would be invoked, then how will this work?

Will there be an exception or will the DML's be sequential? Would be gr8 if some1 can please clarify this:)

Many Thanks,

Cool_D

Ron HessRon Hess
each user has a seperate thread of execution, no chance of a collision when inserting or reading records.
Cool_DevloperCool_Devloper

Thanks so much Ron for the answer. that really helps!!

Just one more question is around the load-balancing. Does salesforce automatically takes care of this if my page is being hit lot many times, compared to other pages?

Will some kinda asynchronous processing help in such a scenario? Please excuse me for my ignorance:(

Cool_D