first come, first served
Those who precede others will have their needs attended to earliest, as in So many people showed up that we may not have enough food to go around, so let it be "first come, first served." The idea is very old, but the first recorded use of this precise phrase was in 1545. Also see early bird catches the worm.
Dictionary.com presents 366 FAQs, incorporating some of the frequently asked questions from the past with newer queries.