iMac 21.5" Late 2009 and external monitor at 2560x1440 with MDP-DP cable?
Apple says it does:

iMac (21.5-inch, Late 2009) - Technical Specifications


  Simultaneously supports full native resolution on the built-in display and up to a 30-inch display (2560 by 1600 pixels) on an external display


A well made Mini DisplayPort to DisplayPort cable should work just fine.