In the online facility assignment problem OFA(k,{ci}ki=1), there exist k servers s1,…,sk on a metric space where each si has an integer capacity ci and a request arrives one-by-one. The task of an online algorithm is to irrevocably match a current request with one of the servers with vacancies before the next request arrives. As special cases for OFA(k,{ci}ki=1), we consider OFA(k,{ci}ki=1)on a line , which is denoted by OFAL(k,{ci}ki=1) and OFALeq(k,{ci}ki=1), where the latter is the case of OFAL(k,{ci}ki=1) with equidistant servers. In this paper, we perform the competitive analysis for the above problems. As a natural generalization of the greedy algorithm grdy, we introduce a class of algorithms called MPFS (Most Preferred Free Servers) and show that any MPFS algorithm has the capacity-insensitive property, i.e., for any MPFS algorithm alg for OFA(k,{ci}ki=1), if alg is c-competitive when c1=⋯=ck=1, then alg is c-competitive for general {ci}ki=1. By applying the capacity-insensitive property of the greedy algorithm grdy, we derive the matching upper and lower bounds 4k−5 on the competitive ratio of grdy for OFALeq(k,{ci}ki=1). To investigate the capability of MPFS algorithms, we show that the competitive ratio of any MPFS algorithm alg for OFALeq(k,{ci}ki=1) is at least 2k−1. Then, we propose a new MPFS algorithm idas (Interior Division for Adjacent Servers) for OFAL(k,{ci}ki=1) and show that the competitive ratio of idas for OFALeq(k,{ci}ki=1) is at most 2k−1, i.e., idas for OFALeq(k,{ci}ki=1) is best possible in all the MPFS algorithms. We also give numerical experiments to investigate the performance of idas and grdy and show that idas performs better than grdy for distribution of request sequences with locality.