Using a space as a backend?

it seems that the endpoint generates cost for the whole duration of being up, not only for computing duration. how did you manage this so that you have both low cost and decent user experience?