Automotive applications need high reliability and service continuity to support self-driving and safety in smart city environments. Suitable allocation of network functions is studied and optimal solutions based on Integer Linear Programming methodology are found. Differentiated reliability concept is applied in the presence of two different 5G classes of service, namely eMBB and URLLC. Saving of processing and bandwidth resources is numerically evaluated by combining service-based shared and dedicated protection in a reference scenario. Scalability aspects of the approach are also discussed.