Rahway is a city in Union County , New Jersey , United States . As of the 2020 census , the city had a population of 29,556. [2]