defence is added up for the entire fleet
if u have 10 ships in 1 fleet with 500 def each, and a fleet attacking that with 4999 attack (after accuracy), then u wont lose any of those 10 ships. another great thing about def is that it renews after ever fleet engages.
if that 1 fleet goes up against 10 fleets each with 4999 attack, u still wont lose a single ship.
dont forget to use absorb
you probably already knew all of this, but heres the better part.
before the defence is hit by the attacking fleet, the absorb factors in. if u have 80% absorb on ur fleet, than it effectively has 25X the shown defence. 5 times for the absorb, 5 times for the last update, and if u have a swarm bonus, u get between 2-6X more defence actually shown.
depending on the situation, defence can actually be very effective.