Network functions are conventionally deployed in the form of specialized hardware appliances. With the growing demand for network agility driven by the rising adaption of virtualization and IaaS workflows, the manual deployment and configuration of physical network function appliances becomes a limiting factor. Network function virtualization (NFV) is a concept that tries to improve network flexibility by converting network functions from dedicated and proprietary hardware appliances to software that runs on general purpose servers. While losing the performance benefit of specialized appliances, NFV allows to dynamically scale and reconfigure network functions. Realizing a NFV deployment however is not trivial as there are many requirements like load balancing and high availability as well as peculiarities, related to the stateful nature of most network functions, to consider. In addition to commodity servers, there is also the possibility to run network functions directly in the network by using capabilities of modern SDN based switches. While this on-path processing could reduce latency, it also further complicates the NFV orchestration and implementation. In this thesis, a survey of the vast body of literature that is concerned with different aspects of NFV, is presented. Based on the related work a generalized system model and design, that also supports on switch network functions, is derived and a catalog of patterns, that are applicable to problems often found in NFV systems, is compiled. Further, a prototype, that implements a subset of the presented patterns in the context of a commonly used network function, is described and the performance and fault tolerance failover behavior of the prototype were evaluated on a realistic testbed.