We address the lateral compliance and elastic stability of a dual-coated fiber of finite length (such as, e.g., an optical fiber interconnect) and apply the obtained solution to a nanorod (nano-wire, nano-fiber, carbon nano-tube) embedded into a low-modulus elastic medium. The latter situation is encountered in nano-composites, as well as in some advanced heat-spreaders employing nano-rod-arrays. Both the photonic (dual-coated fiber) and the nanotechnology (nano-rod embedded into an elastic medium) related problems can be reduced, as far as modeling is concerned, to the problem of the mechanical behavior of a cantilever (in the case of an optical fiber) or a "free-free" (in the case of a nano-rod) beam lying on a continuous elastic foundation and subjected to the combined action of axial compression and lateral loading or to the elevated axial loading. We develop physically meaningful analytical ("mathematical") models that enable one to predict the behavior of the structural elements in question. Our models enable one to determine the appropriate length of the fiber (rod), establish the condition of its elastic stability, select the coating materials or the embedding elastic medium with the most favorable properties, establish the adequate thickness of the primary coating or the level of the contact pressure, etc.