-
Notifications
You must be signed in to change notification settings - Fork 5
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Discussion: Preview of improved Functions http scaling behavior #38
Comments
@davidebbo - do you know if the flag is still needed? Or is it enabled for anyone by default for all functions? |
Great question: we actually had it enabled by default for a few days, but had to turn it off due to some issue. So for now, yes, you still need the flag. Normally, in another few weeks, it will be default again. /cc @suwatch |
Does this change only apply to consumption based plans? |
@Fabian-Schmidt yes, it's only for Consumption. |
To add to the discussion. A blog I found from @JamesRandall led me here. There seems to be an very strong decrease from small peaks we experienced in our HTTP functions. We previously experienced consistent 6ms responses to which suddenly increased to ~600ms. |
@rikvandenberg please provide more details. Are you referring to cold start, or is that the response time you see always? Is this under high load scenario? |
@davidebbo I'll try my best to best explain and what we are seeing. Intro
We call both functions with the exact same parameters in terms of origin and destination locations at the same time asynchronously from an ASP.NET WebAPI application. We are using a We require this timeout/performance to prevent the user request from blocking and we wish to continue. Thus we pre-emptively continue our request, as upon refresh, the route information will most likely be in the cache. Performance Test
Performance Test Results
Possible Causes If you have any suggestions on how to approach these tests to give you more insights as well, please let me know and I'll see what I can do. |
/cc @suwatch who is the expert. @rikvandenberg What you're observing is likely the flipside of the new scale behavior. It's scaling faster (you're getting 10 instances), but at the same time you end up hitting more cold starts (one per instance). We may still need to tweak the system further to balance things. BTW, Would you say that you're functions are CPU bound, or more I/O bound? I would think the later, as waiting for the Google Map result should take very little resources. In that sense, it is odd that it decided to scale this much. @suwatch will dig into it further. |
@rikvandenberg Thank for reporting. This was a result of unwarranted cold starts. Our current scale implementation has a flaw when it comes to low load with occasional burst of concurrent requests. The spikes caused us to scale out to more instances. Since the spike was not sustaining, our scale in logic kicked in and removed the instances. This happened alternately every 1-2 mins and, as a result, a moving set on instances was assigned to the function. This explained the 10 instances from Application Insight. They were not at the same time - but rather a different set over a 10 min period. For each new instance assigned, it caused cold start (spike of long latency). Good news is we have improved this logic by making the scale in less aggressive for this specific situation. The ETA will be 2 weeks. We will let you know to retry your scenario. |
@suwatch Thanks for the quick response! I look forward to testing this improvement. |
@rikvandenberg The fix rollout takes longer than expected. It will be likely be another week before the fix is available across. If you are eager to experiment, try create a function app in West Central US location where the fix is available. Otherwise, wait for a week. |
@rikvandenberg The improvement has been rolled out completely. Do try when you get a chance and provide any feedbacks. |
@suwatch We just had our sprint planning yesterday and have some time available to do a small test. I'll try to use the same test scenario. I'll let you know when we have got something. |
Discussion thread for Azure/app-service-announcements#90.
The text was updated successfully, but these errors were encountered: