I very rarely put characters up against insurmountable challenges. I actually very strongly dislike the Kobayashi Maru style of GMing. I'm not trying to say it is bad -- if you like it, all power to you, and you should play the way you want. I just very much dislike it personally, and find that my players do not enjoy it either. I hate the way 5th Edition DnD has very poorly balanced encounters. Both Hoard of the Dragon Queen and Princes of the Apocalypse have broken encounters at early levels that can easily result in a TPK: one was the result of the fact that Wizards changed some of the monster stats before HotDQ was released, and there is no excuse whatsoever for the one in PotA (which is at level 1 to boot!). I consider those sorts of encounters to be terrible game design.
That said, I do occasionally have the Big Bad Evil Guy of the campaign make an appearance before the characters early in the adventure, to provide the characters with a motive/incentive to fight him -- though I don't usually have the characters fight him directly. And of course, if the characters do something stupid, like try to take on the entire town guard after starting a fight in a tavern, or head out to take on a red dragon at first level, then the PCs will suffer the consequences and might be killed. But if they play smart and don't try to bite off more than they can chew, I don't generally put them up against impossible challenges; or at least I give them a reasonable chance (e.g. lore checks to find out that this creature is much more powerful than they thought) of figuring out that this challenge is too great for them, and that they need to figure out how to disengage or solve the problem another way. I might also drop hints like, 'This spider is really enormous; your attacks don't really seem to be hurting it much'.