Press J to jump to the feed. Press question mark to learn the rest of the keyboard shortcuts

Spark!

Burning 3-6 GBP per hour on Azure to bend data into the right shape then taking it to be part of a ETL aws glue job later on.

see more

GBP?

3

Deployed to an Azure App Service plan (Using Jetty 9.3 - using a 1 core, 3.5gb VM allocation) - doing some light load testing of 50 users and (Generating 10k requests over 5 min) brought my CPU up to 100%, with Azure actually having to send 409's to 15% of the request due to being over the CPU. Memory stayed pretty constant.

Fresh to Scala, but can't figure out what i'm doing wrong to cause CPU to spike so high.. is this something with Jetty that I need to troubleshoot?


https://gist.github.com/monteledwards/83af19cd9e47e4aa7d9ba7b20b0da68f


Background - API just queries Azure AD B2C to determine if the user is a local or social identity user.

3
8 comments

There's a stack overflow waiting to happen at line 31.

see more
Original Poster1 point · 5 months ago

Can you recommend what way of retrying I would implement to prevent that?

Retry 1-2 times with 10-50ms backoff and then return 503 to the client.

see more
Original Poster1 point · 5 months ago

Thanks, will do. I really appreciate the tip. Didn’t think about sending the 503

Load more comments

They're saying OO is to microservices as potato is to missile. They're not the same category of thing.

see more

LOL

Web use Azure at work and WE hate it. Most peole I speak to also hate Azure. What's your opinion about it ?

see more
Original Poster1 point · 5 months ago

Azure has changed a lot throughout the years... I have used both AWS and Azure and I prefer Azure because I find it easier to navigate and manage. ARM templates, az cli and other tools I prefer on azure.

There have been a lot of changes in the PaaS offerings in azure (functions, web apps). The function framework in my post was literally released about 2 weeks ago. V1.0 was very hard to work with if using anything other than .Net.

Besides their management tools I think GCP, AWS, and Azure all suck the same amount. Everyone will always be slightly frustrated and think another cloud provider is better, but trust me it doesn’t make that big of a difference if your services are configured correctly or your using the tooling properly. A management team may just like Azure/AWS arch better :)

Why do you guys hate it?

I recently read somewhere that with AWS Lambda the warmup time of the JVM impairs performance for short-lived processes. From what I understand you're better off writing such functions in something like JavaScript to avoid the overhead.

I'm curious if this is somehow handled differently on Azure Functions, as Scala is usually even a bit slower than Java. Or maybe this problem not as big as it is made out to be..

What's your opinion?

see more
Original Poster1 point · 5 months ago

The cold start on Azure functions for the JVM is about 1-2.5 seconds, and that’s what I’m seeing with my function. Requests after that are handled in about 200ms or less.

There’s a cold start period for every language, and this has improved significantly with the 2.0 runtime release. I’ll have to benchmark and compare this with JavaScript, but I can imagine node.js takes at least 500-1000ms to start up as well.

Java is still in preview so I’m sure we will see the JVM cold start time lowered.

Load more comments

u/justajrdev
Karma
9
Cake day
October 8, 2018
Trophy Case (1)
Verified Email

Cookies help us deliver our Services. By using our Services or clicking I agree, you agree to our use of cookies. Learn More.