https://kotlinlang.org logo
#ktor
Title
# ktor
s

spierce7

03/28/2021, 3:51 PM
Has anyone gotten graalvm native-image working with just ktor on any of the server engines (i.e. netty)? Someone gave me an example of it working with micronaut + ktor, but I haven’t been able to get it working with just ktor, as graal has lots of problems with netty it seems.
I was able to get it working with CIO. How stable is CIO though?
s

Sean Keane

03/29/2021, 1:35 AM
I've been using CIO with no issues. The main drawback with CIO is that it only supports HTTP/1.x (Not sure if that will be an issue on your side)
s

spierce7

03/29/2021, 3:51 AM
I’m using this inside of Cloud Run. I’m not 100% sure but I think it’s likely users aren’t making a direct connection to my server anyways.
s

Sean Keane

03/30/2021, 2:48 PM
You should be ok. It will be funnelled through the load balancer anyway so I would be surprised if anything goes down.
s

spierce7

03/30/2021, 3:52 PM
FYI - graalvm + ktor is fantastic. On cloud-run’s cheapest shared servers, I’m seeing cold server response times of 900 millis. That’s amazing I think.
🙂 1
K 2
😲 1
s

Sean Keane

04/01/2021, 7:22 PM
Oh ya? Do you have a base template or something by any chance? This sounds amazing.
s

spierce7

04/01/2021, 8:42 PM
FYI - The day after, I started seeing startup times move from 900 millis to 1800 millis. Not clear to me why yet.
s

Sean Keane

04/01/2021, 8:53 PM
Thats quite odd... Same when you test it local?
2 Views