The cost function and the system stationary probability are two key criteria in the design of queuing systems. In this paper, the aim is to design a single server queuing models with infinite capacity, where the service times in the first model and the interarrival times in the second model are assumed to have an Erlang distribution. For this purpose, a new index based on the cost function and the system reliability probability is introduced, the larger of which indicates the optimality of the model. Several numerical examples and an applied example are presented to explain the computational details of the proposed method.