Farms at main base

Say I wanted to have a iron farm and trading hall at my main base for librarians and small house professions for other job blocks what would be the distance that the iron farm would have to be from the trading houses / and or trading hall without it throwing golems all over the place?